Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include directive dislikes directories #104

Closed
TheCodedOne opened this issue Sep 5, 2021 · 2 comments
Closed

Include directive dislikes directories #104

TheCodedOne opened this issue Sep 5, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@TheCodedOne
Copy link

TheCodedOne commented Sep 5, 2021

Describe the bug
When using include and directories, if you include a file that includes another, it attempts to include the sub-include based on the directory of the original script rather than of the script actually trying to include.

To Reproduce
Create 3 scripts

/a.nolol
/b.nolol
/c/c.nolol

have b include a, and c include b.
see c error that it cannot find a

Code

/a.nolol

hello=world

/b.nolol

include "a"

/c/c.nolol

include "../b"

Expected behaviour
Nolol compilation should include based on the local directory of the file including, or have a way of defining a root directory to base all includes from

Platform:

  • OS: windows
  • YODK: 0.1.9
@TheCodedOne TheCodedOne added the bug Something isn't working label Sep 5, 2021
@dbaumgarten
Copy link
Owner

You are right. Includes are currently always relative to the main-file, which causes issues with nested includes accross multiple directories.
Making all includes relative to the current file would probably be the best solution.

@dbaumgarten dbaumgarten added the waiting for release Has been implemented but not yet published label Sep 9, 2021
@dbaumgarten
Copy link
Owner

Published as part of v0.1.10

@dbaumgarten dbaumgarten removed the waiting for release Has been implemented but not yet published label Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants