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

[2.x] Fix mixed compilation to JAR #1376

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Jul 8, 2024

For the second compilation step of a mixed compilation (Scala then Java, or vice versa), Zinc copies the current output Jar to a temporary jar. All dependencies on this temporary jar must be declared as internal class dependencies. To do so we we cannot use the declared class file (the temporary jar), instead we use the binary class name, which is stored in a binaryNameToClassName map.

@eed3si9n
Copy link
Member

eed3si9n commented Jul 8, 2024

If possible, could you add a scripted test for this please?

@adpi2
Copy link
Member Author

adpi2 commented Jul 9, 2024

@eed3si9n the scripted tests are disabled in this wip/sbt-2.x branch. But I have 2 scripted tests in sbt/sbt#7592 that would fail without this.

I should backport this PR to 1.x and add a scripted test there, but I am not yet sure if it is possible to configure compilation to JAR.

@adpi2 adpi2 merged commit 5fd2231 into sbt:wip/sbt-2.x Jul 10, 2024
8 checks passed
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.

2 participants