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

Adjust the API name entry for nested classes #20279

Merged
merged 1 commit into from
May 14, 2024

Conversation

eed3si9n
Copy link
Member

Problem

#20157 demonstrated that some build pipelining tests fail on the latest sbt 1.10.0-RC2:

Error:  (sbt-test / scripted) Failed tests:
Error:  	pipelining/Yjava-tasty-fromjavaobject
Error:  	pipelining/Yjava-tasty-paths

This is likely caused by inconsistent capturing of APIs from Java sources in ExtractAPI vs AnalyzingJavaCompiler in Zinc.

Solution

This adjusts the API name entry for Java nested classes.

@bishabosha
Copy link
Member

Thanks for investigating this! I'll review soon

@lrytz
Copy link
Member

lrytz commented May 6, 2024

Should this be backported to Scala 2?

@eed3si9n
Copy link
Member Author

eed3si9n commented May 6, 2024

2.13 bridge should be ok hopefully. As far as I know, the extracted name hasn't changed on Zinc side in a while.

Copy link
Member

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

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

LGTM

So the problem was the canonical name of Java static class:

package example;

class A {
  static class B { }
}

The canonical name of B should be example.A.B and not example.A$.B

**Problem**
Some build pipelining tests fail on the latest sbt RC.

```
Error:  (sbt-test / scripted) Failed tests:
Error:  	pipelining/Yjava-tasty-fromjavaobject
Error:  	pipelining/Yjava-tasty-paths
```

This is likely caused by inconsistent capturing of APIs
from Java sources in ExtractAPI vs AnalyzingJavaCompiler in Zinc.

**Solution**
This adjusts the API name entry for Java nested classes.
@adpi2 adpi2 merged commit 796fba7 into scala:main May 14, 2024
19 checks passed
@eed3si9n eed3si9n deleted the wip/canonical_name branch May 14, 2024 12:18
@Kordyjan Kordyjan added this to the 3.5.1 milestone Jul 3, 2024
WojciechMazur added a commit that referenced this pull request Jul 6, 2024
Backports #20279 to the LTS branch.

PR submitted by the release tooling.
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.

5 participants