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

Closed
headius opened this issue Jul 6, 2015 · 0 comments
Closed

Precompiled .class can't reflect new filename #3109

headius opened this issue Jul 6, 2015 · 0 comments

Comments

@headius
Copy link
Member

headius 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 9.0.0.0 milestone Jul 6, 2015
headius added a commit that referenced this issue Jul 6, 2015
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
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 as completed in 32ef1f0 Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant