Switch to mapped directories instead of a search path #156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request changes how files are searched for in a
#load
directive.Previously, there was a "search path" that the compiler would append the file's name onto the end of each entry in the search path, and see if that file exists. If so, that file would be used. This was repeated for every entry in the list. By default the only two folders in the search path were the current directory and the
ONYX_PATH
.Now,
#load
directives must either be relative to the current file (start with./
), or specify a mapped folder name to search from. This way, the programmer is aware of exactly where the file comes from.In the code, it looks like this:
By default, there is now only one mapped directory called
core
, which points toONYX_PATH/core
. You can add mapped directories using the--map-dir
CLI argument: