Skip to content

Fix inspectTastyFilesInJar in TastyInspector #13254

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

Merged
merged 3 commits into from
Aug 18, 2021

Conversation

romanowski
Copy link
Contributor

Add integration test

fixes #12852

@nicolasstucki
Copy link
Contributor

Now that we are re-compiling the full std-lib from the jar we hit another issue.

Test dotty.tools.dotc.BootstrappedStdLibTASYyTest.testFromTastyInJar failed: java.lang.AssertionError: assertion failed: class Unit, took 14.974 sec

It looks like scala/Unit.tasty is in the blacklist. Maybe there is a bug with the blacklisting logic or the filtering logic.

@BarkingBad
Copy link
Contributor

The problem was the paths returned from traversing the Jar file were with prefix root indicator in its own filesystem (e. g. /scala/Unit.tasty) and we compared it to relative paths (e. g. scala/Unit.tasty). Removing the leading files separator should fix the blacklisting of the primitives and also should work with loading correct class names (the next transformation is replacing all the slashes / with the dots ., which in fact would create names with leading dot, e. g. .scala.collection.immutable.List

@BarkingBad BarkingBad force-pushed the tastyreader/fix-from-jar branch from db35221 to 943cf0d Compare August 17, 2021 13:06
Copy link
Contributor

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

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

Successfully merging this pull request may close these issues.

TastyInspector.inspectTastyFilesInJar only inspects top-level tastys
4 participants