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

Group artifacts that need to be upgraded together #2459

Open
ekrich opened this issue Jan 11, 2022 · 3 comments
Open

Group artifacts that need to be upgraded together #2459

ekrich opened this issue Jan 11, 2022 · 3 comments

Comments

@ekrich
Copy link

ekrich commented Jan 11, 2022

A classic case of this is scalafix and the exact Scala version that matches.

For example, an update like scalafix cannot occur without Scala 2.13.8 which is not formally released yet - ekrich/sconfig#228

I don't know if this is possible but it would really help at least in this case.

@exoego
Copy link
Contributor

exoego commented Feb 9, 2022

Maybe updates.ignore in default Scala Steward can care this.

updates.ignore = [
// Ignore the next Scala 3 version until it is announced.
{ groupId = "org.scala-lang", artifactId = "scala3-compiler", version = { exact = "3.1.2" } },

It does not upgrade dependencies together, but can wait until related dependency release.
So, something like this:

  // Ignore the next sbt-scalafix version until next Scala 2.13 version is announced.
  { groupId = "ch.epfl.scala", artifactId = "sbt-scalafix", version = { exact = "0.9.35" } },

It would be helpful if updating this entry is added in sbt-scalafix release workflow.

@bjaglin
Copy link
Contributor

bjaglin commented Feb 9, 2022

For example, an update like scalafix cannot occur without Scala 2.13.8 which is not formally released yet - ekrich/sconfig#228

For most of the sbt-scalafix usages (using rules, not defining them), upon a new Scala release, sbt-scalafix should be bumped before Scala, so that semanticdb support for the upcoming release is ready. The new Scala 2.x release process fixes that since sbt-scalafix PRs are opened ahead of the Scala PRs (provided a new release of sbt-scalafix is tagged fast enough) because of the Scala embargo in updates.ignore.

In your case, the bump of sbt-scalafix and scala must be done atomically because you define rules in the project (the missing full cross-build artifact missing is scalafix-testkit). So I am not sure adding sbt-scalafix to updates.ignore would help.

In both cases, for Scala 3.x, there is no problem as the support for generating semanticdb files is baked-in in the compiler.

@bjaglin
Copy link
Contributor

bjaglin commented Feb 9, 2022

If the Scala versions used in the scalafix modules of your build were coming from sbt-scalafix, there wouldn't be a problem since the sbt-scalafix bump could be merged independently of the Scala bump for the rest of the modules.

I guess it won't be easy as-is as the build uses the built-in crossScalaVersions. I see 2 options

  1. Moving to sbt-projectmatrix like https://github.com/scalacenter/scalafix.g8/blob/4518a742d1e4bdcf4426075a58444e031f6e845d/src/main/g8/scalafix/build.sbt would make it possible.
  2. I am not sure that's what you want either but using sbt-scalafix to drive your main Scala versions would do the trick.

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

No branches or pull requests

3 participants