-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Regression in ClassfileParser #15166
Labels
Milestone
Comments
WojciechMazur
added
itype:bug
stat:needs minimization
Needs a self contained minimization
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
May 11, 2022
Regressed in #14426 |
griggt
added
the
regression
This worked in a previous version but doesn't anymore
label
May 11, 2022
Minimized to: InterfaceStability.java @InterfaceAudience.Public
public class InterfaceStability {
public @interface Evolving { }
} InterfaceAudience.java @InterfaceStability.Evolving
public class InterfaceAudience {
public @interface Public { }
} Test.scala val x: InterfaceAudience.Public = ???
|
griggt
added
compat:java
and removed
stat:needs minimization
Needs a self contained minimization
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
May 11, 2022
griggt
added a commit
to griggt/dotty
that referenced
this issue
May 19, 2022
When scanning for Scala pickling annotations, all annotations in all classfiles (including those produced by the Java compiler) are considered. Before this commit, a Type and Symbol were created for each discovered annotation and comparared to the known Scala signature annotation types. In certain situations (as in tests/pos/i15166), this is problematic, as the denotation of an annotation symbol defined as a Java inner class may be forced before the inner class table is populated and setClassInfo is called on the class root. Comparing names (as strings) rather than type symbols avoids this situation. Fixes scala#15166
griggt
added a commit
to griggt/dotty
that referenced
this issue
May 19, 2022
An alternative fix for scala#15166, which aligns with the behavior of the Scala 2 classfile parser. Before this commit, all classfiles, including those produced by the Java compiler and compilers of other JVM languages, were scanned for Scala pickling annotations. In certain situations (as in tests/pos/i15166), this is problematic, as the denotation of an annotation symbol defined as a Java inner class may be forced before the inner class table is populated and setClassInfo is called on the class root. We avoid this situation by only performing the pickling annotation scan for those classfiles having the `ScalaSig` attribute, i.e. those produced by the Scala 2 compiler. We also drop support for pickling TASTy using the classfile annotations `scala.annotation.internal.TASTYSignature` and `scala.annotation.internal.TASTYLongSignature`. These were never used by the compiler, there are no plans for future use, and preserving support would complicate this fix.
griggt
added a commit
to griggt/dotty
that referenced
this issue
May 23, 2022
An alternative fix for scala#15166, which aligns with the behavior of the Scala 2 classfile parser. Before this commit, all classfiles, including those produced by the Java compiler and compilers of other JVM languages, were scanned for Scala pickling annotations. In certain situations (as in tests/pos/i15166), this is problematic, as the denotation of an annotation symbol defined as a Java inner class may be forced before the inner class table is populated and setClassInfo is called on the class root. We avoid this situation by only performing the pickling annotation scan for those classfiles having the `ScalaSig` attribute, i.e. those produced by the Scala 2 compiler. We also drop support for pickling TASTy using the classfile annotations `scala.annotation.internal.TASTYSignature` and `scala.annotation.internal.TASTYLongSignature`. These were never used by the compiler, there are no plans for future use, and preserving support would complicate this fix.
bishabosha
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Oct 18, 2022
When scanning for Scala pickling annotations, all annotations in all classfiles (including those produced by the Java compiler) are considered. Before this commit, a Type and Symbol were created for each discovered annotation and comparared to the known Scala signature annotation types. In certain situations (as in tests/pos/i15166), this is problematic, as the denotation of an annotation symbol defined as a Java inner class may be forced before the inner class table is populated and setClassInfo is called on the class root. Comparing names (as strings) rather than type symbols avoids this situation. Fixes scala#15166
bishabosha
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Oct 18, 2022
An alternative fix for scala#15166, which aligns with the behavior of the Scala 2 classfile parser. Before this commit, all classfiles, including those produced by the Java compiler and compilers of other JVM languages, were scanned for Scala pickling annotations. In certain situations (as in tests/pos/i15166), this is problematic, as the denotation of an annotation symbol defined as a Java inner class may be forced before the inner class table is populated and setClassInfo is called on the class root. We avoid this situation by only performing the pickling annotation scan for those classfiles having the `ScalaSig` attribute, i.e. those produced by the Scala 2 compiler. We also drop support for pickling TASTy using the classfile annotations `scala.annotation.internal.TASTYSignature` and `scala.annotation.internal.TASTYLongSignature`. These were never used by the compiler, there are no plans for future use, and preserving support would complicate this fix.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Issue spotted when trying to compile https://github.com/mjakubowski84/parquet4s using the latest nightly
More logs: https://scala3.westeurope.cloudapp.azure.com/job/buildCommunityProject/775/artifact/build-logs.txt
Compiler version
3.2.0-RC1-bin-20220429-400427d-NIGHTLY
Works with 3.1.2
Fails with 3.1.3-RC2
First bad commit 681e17e in #14426
Minimized code
Needs further minimization:
Sources failing class: https://github.com/apache/yetus/blob/main/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java
Output
Expectation
ClassfileParser should be able to read to jar
The text was updated successfully, but these errors were encountered: