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
Remove nqp-home/lib and rakudo-home/lib from vm search paths #5304
Conversation
The removed comment suggests that this code shouldn't be needed anymore, since `:from<NQP>` was implemented at some point. The passing `make test` and `make spectest` also suggest this code is not needed anymore. However, to be clear, I'm not sure why the `:from<NQP>` adverb might make this library inclusion required.
Did you try this outside of CI? I suspect this breaks the installed executables. (The ones generated in the build directory are probably fine.) |
It is still early for me so maybe I'm overlooking it, but what actions can I take to demonstrate the executable being broken now? |
I would expect about nothing to work with the nqp libraries not being found. To be extra sure, try doing something that loads a module. The only idea I have, why it might work is that the Or I'm wrong and this somehow works in a way I don't understand... |
I'll test that later today sometime if someone else doesn't beat me to it. I wonder if we should have a CI test that does something like run |
Actually there is: https://github.com/rakudo/rakudo/blob/main/azure-pipelines.yml#L208 |
It seems to work 🤔 |
Nothing worse than when something works when you think it shouldn't...
|
Everything works even if I make vm_search_paths return an empty array 🤔 |
Ugh, it's too long since I wrote this... :-( I think https://github.com/rakudo/rakudo/blob/main/src/vm/moar/runner/main.c#L428-L446 is the reason these paths are not needed in Moars ModuleLoaderVMConfig. The paths are needed very early on for Moar to find Rakudo itself and in turn the module loader. That's why the paths are added in the runner. I notice that neither the JVM nor JS ModuleLoaderVMConfigs return the nqp/rakudo-home lib dirs. Removing those paths in Moars ModuleLoaderVMConfig would be consistent. I notice that the rakudo-home directory not only contains the @ugexe It seems you are right. nqp-home and rakudo-home are both not needed and can go. |
rakudo-home/lib is provided elsewhere, and thus this search path isn't needed. This makes the vm_search_path return an empty array, similar to the JS backend. Note that we don't get rid of the vm_search_path method altogether because the JVM can return a non empty array of paths.
vm_search_path
used to provide some library paths for MoarVM that are now provided by other methods. This removes these redundant search paths for MoarVM similar to what we do for the JavaScript back end.