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

Compiled .exe is changing execution behaviour when .lua source files are changed, without recompilation. #6

Open
null-circle opened this issue May 25, 2024 · 1 comment

Comments

@null-circle
Copy link

I created a .exe using "rtc -s main.lua ." (static compilation, integrating the source files in the current directory into the .exe) resulting in main.exe. If the .lua source files in the directory are changed, the execution of main.exe changes to match the changes in the source files without recompiling the .exe.
If main.exe is moved into a different folder (so it is not in the same folder as the .lua source files) the execution behaviour reverts to the behaviour matching the source files at the time it was compiled.

@samyeyo
Copy link
Owner

samyeyo commented May 27, 2024

It's not really a bug, as LuaRT module search starts first with package.path and package.cpath values.

If not found, the module is then searched in the executable embedded content.

Maybe I will modify this to search first for modules bundled with the executable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants