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

Precompiled .class can't reflect new filename #3109

headius opened this Issue Jul 6, 2015 · 0 comments


None yet
1 participant
Copy link

commented Jul 6, 2015

In the old precompiler, the Script loaded from a .class was immediately updated to reflect its actual FILE location. The new precompiler just serializes the IR, which embeds the original filename as a literal string.

We need to modify serialization and loading of IR to replace the old filename with the new, actual filename.

@headius headius added this to the JRuby milestone Jul 6, 2015

headius added a commit that referenced this issue Jul 6, 2015

Get AOT-compiled scripts loading properly again. Fixes #3018
Note that there's still one missing piece, as detailed in #3109:
we are not updating loaded scripts with their actual filename. The
original filename they were compiled from is still there, which
may cause problems with require_relative and friends.

headius added a commit that referenced this issue Jul 6, 2015

Do not persist filename in IR; require it when loading.
Fixes #3109

Because compiled scripts may be moved around or loaded from
locations different than when they were compiled, we must pass
filename into the decoding process to allow the script to reflect
the new filename.

@headius headius closed this in 32ef1f0 Jul 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.