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

Signature files produced by `-Ypickle-write` do not contain enclosing filename #11797

Open
olafurpg opened this issue Nov 11, 2019 · 3 comments
Open
Assignees
Labels
Milestone

Comments

@olafurpg
Copy link
Member

@olafurpg olafurpg commented Nov 11, 2019

Currently, *.sig files produced by -Ypickle-write do not contain the filename where the symbols originate. The filename is normally included in *.class files and is used by IDEs to navigate to library dependencies.

See https://youtrack.jetbrains.com/issue/SCL-16543 for a related discussion on making IntelliJ Scala pick up *.sig files.

Would it be possible somehow to encode the filename in *.sig files? I'm not sure exactly where would be the place for such information 🤔

@SethTisue SethTisue added this to the Backlog milestone Nov 21, 2019
@SethTisue

This comment has been minimized.

Copy link
Member

@SethTisue SethTisue commented Nov 21, 2019

@lrytz who on the team is best positioned to comment on this?

@lrytz

This comment has been minimized.

Copy link
Member

@lrytz lrytz commented Nov 22, 2019

Ping @retronym - is there a way to do it without extending the pickle format, so that an existing 2.13.1 compiler could read a pickle generated by 2.13.x that contains the source file name?

@retronym

This comment has been minimized.

Copy link
Member

@retronym retronym commented Nov 27, 2019

One solution would be to wrap the Pickle in a mostly-empty .class file. That could contain any classfile attributes.

I considered this approach at one stage as it is nice for tooling, but in the end I opted for the more efficient direct representation of just putting the pickle bytes in the .sig file directly.

Without extending the pickle format, we might be able to encode the filename attribute as a synthetic annotation inside the pickle.

@retronym retronym self-assigned this Nov 27, 2019
@SethTisue SethTisue modified the milestones: Backlog, 2.13.2 Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.