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

Eliminate FromJavaObject from TASTy of Java sources #19259

Merged
merged 11 commits into from
Dec 15, 2023

Conversation

bishabosha
Copy link
Member

Do not pickle type references to FromJavaObject for Java sources, instead insert them at unpickling time. This ensures consistency of IDENTtpt (where Object is given an explicit type) and SELECTtpt where the type has to be resolved from just the name Object.

modify -Ytest-pickler to check for the presence of FromJavaObject

Also we compare unpicking Java signatures from TASTy to unpicking from class files to ensure consistency

fixes #19246

@bishabosha bishabosha added the needs-minor-release This PR cannot be merged until the next minor release label Dec 13, 2023
@bishabosha bishabosha added this to the 3.4.0 milestone Dec 13, 2023
@bishabosha bishabosha requested a review from sjrd December 13, 2023 16:53
@bishabosha
Copy link
Member Author

bishabosha commented Dec 14, 2023

We are also considering dropping the "fake" constructor added to all java classes by the parser

public class Foo {
  private Foo(scala.Unit x$1) {} // COMPILER GENERATED
}

also the fake "default constructor" inserted for an empty java class should have a body

public class B {}

@bishabosha bishabosha force-pushed the stabilise-java-tasty branch 2 times, most recently from 04d6598 to e1d9ea4 Compare December 15, 2023 14:07
@bishabosha bishabosha requested a review from sjrd December 15, 2023 14:11
@bishabosha
Copy link
Member Author

bishabosha commented Dec 15, 2023

@sjrd no idea why but the spec keeps failing to build due to ruby gem errors unrelated to this PR

@bishabosha
Copy link
Member Author

ignoring the weird spec CI error

@bishabosha bishabosha merged commit 08572ee into scala:main Dec 15, 2023
18 of 19 checks passed
@bishabosha bishabosha deleted the stabilise-java-tasty branch December 15, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-minor-release This PR cannot be merged until the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure consistent JAVAattr tasty output
2 participants