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

Update Zinc used by the Scala plugin to 1.6.1 #19864

Merged
merged 7 commits into from
Apr 26, 2022

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Feb 9, 2022

Fixes #15491

Context

The currently used version of zinc is havily outdated and missing a lot of new fixes. It's also being depracated and will most likely stop working at some point with Scala 3

Contributor Checklist

  • Review Contribution Guidelines
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
  • Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
  • Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
  • Provide unit tests (under <subproject>/src/test) to verify logic
  • Update User Guide, DSL Reference, and Javadoc for public-facing changes
  • Ensure that tests pass sanity check: ./gradlew sanityCheck
  • Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation
  • Recognize contributor in release notes

@tgodzik
Copy link
Contributor Author

tgodzik commented Feb 9, 2022

@ljacomet could you take a look at it?

Copy link

@dubinsky dubinsky left a comment

Choose a reason for hiding this comment

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

Thanks!!!

@ljacomet ljacomet self-assigned this Feb 11, 2022
Copy link
Member

@ljacomet ljacomet left a comment

Choose a reason for hiding this comment

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

Thanks a lot for helping out Gradle Scala users!

See below for a couple comments on dependency verification.

Most important though is the compatibility conversation. I believe we had one already when Zinc 1.5 was released, but I cannot find it ...

@dubinsky
Copy link

@tgodzik Any updates on this? Thanks!

@big-guy big-guy added the from:contributor PR by an external contributor label Apr 1, 2022
Copy link
Member

@ljacomet ljacomet left a comment

Choose a reason for hiding this comment

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

First of all, thanks for the contribution.
And sorry it took so long to get a decision for having this in a minor.

But the answer is now yes, so let's see about getting it in Gradle 7.5.

Would you be able to also do some documentation changes:

  • Update the Zinc compatibility table
  • Add an entry into the potential breaking changes of the upgrade guide - file upgrading_version_7.adoc

@ljacomet ljacomet added this to the 7.5 RC1 milestone Apr 6, 2022
@ljacomet ljacomet added in:scala-plugin @support Issues owned by GBT support team labels Apr 6, 2022
@ljacomet
Copy link
Member

ljacomet commented Apr 6, 2022

Looks like running all tests on CI raises a number of problems.
Can you reproduce the issues in org.gradle.scala.compile.* tests?

@tgodzik
Copy link
Contributor Author

tgodzik commented Apr 7, 2022

Looks like running all tests on CI raises a number of problems. Can you reproduce the issues in org.gradle.scala.compile.* tests?

I will take a look as soon as possible, just got back from vacation so that might take a bit, but hopefully I should get it fixed by next week.

@tgodzik tgodzik force-pushed the update-zinc-1.6.1 branch 2 times, most recently from aac8b4b to ca4f815 Compare April 15, 2022 16:43
@tgodzik
Copy link
Contributor Author

tgodzik commented Apr 15, 2022

Looks like running all tests on CI raises a number of problems. Can you reproduce the issues in org.gradle.scala.compile.* tests?

@ljacomet The tests should be fixed, I added a section for the Zinc compatibility table and added a section for potential breaking changes

@tgodzik
Copy link
Contributor Author

tgodzik commented Apr 25, 2022

@ljacomet I haven't noticed that some of the tests were failing, but they should be fixed now, protobuf was dropped from zinc (shaded version exists). It is still in Scala 3, but that is most likely related to the fact that the bridge resides in the compiler itself instead of Zinc,

@ljacomet
Copy link
Member

@tgodzik Could you rebase this against the release branch?
I would like to try to get it in 7.5.

You will then need to change the target branch to release as well.

tgodzik and others added 3 commits April 26, 2022 09:39
Signed-off-by: Tomasz Godzik <tomek.godzik@gmail.com>
Signed-off-by: Tomasz Godzik <tgodzik@virtuslab.com>
Signed-off-by: Tomasz Godzik <tgodzik@virtuslab.com>
The issue is most likely related to sbt/zinc#799

Signed-off-by: Tomasz Godzik <tgodzik@virtuslab.com>
@ljacomet ljacomet changed the base branch from master to release April 26, 2022 07:40
@ljacomet
Copy link
Member

I have done the rebase and change of base branch.

@gradle gradle deleted a comment from ljacomet Apr 26, 2022
@gradle gradle deleted a comment from ljacomet Apr 26, 2022
@gradle gradle deleted a comment from ljacomet Apr 26, 2022
@gradle gradle deleted a comment from ljacomet Apr 26, 2022
@ljacomet
Copy link
Member

@bot-gradle test this

@gradle gradle deleted a comment from ljacomet Apr 26, 2022
@bot-gradle
Copy link
Collaborator

OK, I've already triggered the following builds for you:

@tgodzik
Copy link
Contributor Author

tgodzik commented Apr 26, 2022

I have done the rebase and change of base branch.

Thanks, sorry that I didn't get to it right away!

@ljacomet
Copy link
Member

No worry, my ability to help steer this was quite spotty 😉

Copy link
Member

@ljacomet ljacomet left a comment

Choose a reason for hiding this comment

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

Green build!

Thanks @tgodzik for proposing this and following up even after time passed!

@ljacomet
Copy link
Member

@bot-gradle test and merge

@gradle gradle deleted a comment from ljacomet Apr 26, 2022
@bot-gradle
Copy link
Collaborator

OK, I've already triggered a build for you.

@bot-gradle bot-gradle merged commit d794efc into gradle:release Apr 26, 2022
if (!e.getKey().exists() || !e.getValue().equals(Stamper.forLastModified().apply(e.getKey()))) {
for (Map.Entry<VirtualFileRef, Stamp> e : previousAnalysis.readStamps().getAllLibraryStamps().entrySet()) {
File path = CONVERTER.toPath(e.getKey()).toFile();
if (!path.exists() || !e.getValue().equals(Stamper.forLastModifiedInRootPaths(CONVERTER).apply(e.getKey()))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would like to raise attention to this line which I think is incorrect and seems to have caused #20101
e.getValue seems to be a FarmHash, not a LastModified.

Copy link
Contributor

Choose a reason for hiding this comment

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

TBH I'm not even sure why Gradle provides the ExternalBinariesLookup when it effectively could rely on zinc's change detection in the getOrElse case here: https://github.com/sbt/zinc/blob/develop/internal/zinc-core/src/main/scala/sbt/internal/inc/IncrementalCommon.scala#L407

@tgodzik tgodzik deleted the update-zinc-1.6.1 branch October 24, 2022 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:contributor PR by an external contributor in:scala-plugin @support Issues owned by GBT support team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scala 2.13 with Zinc 1.4.3 fails with NoSuchMethodError
7 participants