-
Notifications
You must be signed in to change notification settings - Fork 79
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
Module load paths are relative to the importing file, but they should be relative to the directory from which the command is executed #227
Comments
Hi @jbrains, I totally agree with you. I have tried to address your concern in #228, by interpreting the paths given via Module path resolution is a rather hairy topic, see #202. I'm very glad that you are testing this functionality more than I did so far. Please let me know if you encounter more issues. |
Oh, and thanks a lot for your very detailed bug report, by the way! |
This is one of my particular forms of programmer empathy. I write defect reports that I wish others would write for me. |
I will try this out over the next few days, but my very early testing looks promising. I really appreciate the change. |
I'm closing this issue now. When you encounter another issue with module loading, feel free to open a new issue. Thanks again! |
I'm struggling to use modules with
jaq
and I've run into a very surprising bit of behavior.It appears that, when I specify the module load path,
jaq
applies that load path relative to the file doing the importing. It should apply the load path relative to the directory in which the command is executed, which is how load paths work in every other programming language in which I've used them as well as howjq
works.Notice the difference between
jaq
andjq
.To be clear,
module_folder
andmain_folder
are both located in the directory where I run those commands.It defeats the purpose of a load path if I have to change the load path depending on the location of the "main" file that I run. I expect a load path to stay the same no matter where the source files are that are importing from modules on that load path. It also defeats the purpose of a load path if I have to use absolute paths on it, then I can't move the root of my project without changing all my
jaq
commands/scripts.The text was updated successfully, but these errors were encountered: