-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Possible bug with paths #127
Comments
Seems like it was a bug in my code; actually not a bug, but the old way of doing things. After I rewrote Can we add a note in the documentation to make it obvious for end-users that this should be the way of requiring modules that are relative to project's path? |
This is not the proper way to require modules relative to the same path, because it is platform dependent, while Linux uses |
Like Python...interesting.
In Lua, how do you handle paths under Windows? |
Lua does this way: When you do |
...and Nelua does not do that already to match Lua's behavior? |
It does. |
So what should be the Lua way to require modules relative to the same path as the one we need to run? |
This is not possible in Lua, the only thing you can do in Lua is to add search paths, in Nelua you can also add search paths with |
I see... |
I have started writing a shell script to automate my Nelua tests and instead of going in the directory where the files are located, I have decided to let the script test them for me, from a separate location of course.
The script looks like this:
When executed from
$HOME/programming/
directory that is located, it throws an error for this particular module only:The interesting part is...when I go to
/home/stefanos/code/nelua/Overview/
and runfor name in *.nelua; do echo "$name"; nelua -tb "$name"; done
, everything works as expected.Is it something that has to do with the relative / absolute paths?
I always confuse these two how they should work or behave.
My suspicion is telling me is related to b17a77b where you introduced support for relative requires in the preprocessor.
The text was updated successfully, but these errors were encountered: