Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Can we release a new version of scalafix-organize-imports #227

Closed
mlachkar opened this issue Oct 31, 2021 · 7 comments
Closed

Can we release a new version of scalafix-organize-imports #227

mlachkar opened this issue Oct 31, 2021 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@mlachkar
Copy link

mlachkar commented Oct 31, 2021

Hello,
Meanwhile moving this rule to scalafix, which I would like to help on, can we do a release of scalafix-organize-imports. I would unblock people using scala 3, with given statement.
Or would we need that this bug is fixed #221 ?
Thanks a lot!

@liancheng
Copy link
Owner

Thanks for bringing this up. I think we can leave #221 as a known issue and fix it later. But I'm having another issue with the Release workflow. It started failing after upgrading Scalafix to 0.9.31, and complains:

[error] sbt.librarymanagement.ResolveException: Error downloading ch.epfl.scala:scalafix-testkit_2.12.14:0.9.31

Not quite sure why Scala 2.12.14 is involved here since Scalafix 0.9.31 upgraded to 2.12.15, and OrganizeImports is referring to whichever Scala 2.12 version Scalafix uses.

@liancheng
Copy link
Owner

liancheng commented Nov 2, 2021

While trying to reproduce this issue, I ran +test and noticed the following output:

[info] Setting Scala version to 2.12.14 on 9 projects.
[info] Excluded 16 projects, run ++ 2.12.14 -v for more details.

Following the instruction to run ++ 2.12.14 -v produced:

[info] Setting Scala version to 2.12.14 on 9 projects.
[info] Switching Scala version on:
[info]     rules2_12 (2.12.15)
[info]     testsTarget2_12 (2.12.15)
[info]   * scalafix-organize-imports (2.12.14)
[info]     input2_12 (2.12.15)
[info]     tests (2.12.14)
[info]     testsTarget3 (2.12.15)
[info]     inputUnusedImports2_12 (2.12.15)
[info]     output2_12 (2.12.15)
[info]     shared2_12 (2.12.15)
[info] Excluding projects:
[info]     input2_11 (2.11.12)
[info]     inputUnusedImports3 (3.1.0)
[info]     output2_11 (2.11.12)
[info]     inputUnusedImports2_13 (2.13.6)
[info]     rules2_13 (2.13.6)
[info]     shared3 (3.1.0)
[info]     output3 (3.1.0)
[info]     input3 (3.1.0)
[info]     shared2_13 (2.13.6)
[info]     inputUnusedImports2_11 (2.11.12)
[info]     output2_13 (2.13.6)
[info]     testsTarget2_11 (2.11.12)
[info]     testsTarget2_13 (2.13.6)
[info]     shared2_11 (2.11.12)
[info]     rules2_11 (2.11.12)
[info]     input2_13 (2.13.6)
[info] Reapplying settings...
[info] set current project to scalafix-organize-imports (in build file:/Users/lian/local/src/scalafix-organize-imports/master/)

It's weird that only the scalafix-organize-imports and tests projects are tied to 2.12.14 while the other 2.12 projects are tied to 2.12.15.

@liancheng liancheng added the help wanted Extra attention is needed label Nov 2, 2021
@liancheng
Copy link
Owner

Took a stab last night but had no luck... My hunch is that this is possibly related to the project matrix change. @bjaglin, could you please kindly take a look? Thanks in advance!

@bjaglin
Copy link
Contributor

bjaglin commented Nov 3, 2021

I believe +test was working until now because the default crossScalaVersion in sbt (used for classic cross-building) was matching the one of Scalafix (referenced in the project matrix), but it's no longer the case

sbt:scalafix-organize-imports> crossScalaVersions
[info] output2_11 / crossScalaVersions
[info] 	List(2.11.12)
[info] testsTarget2_13 / crossScalaVersions
[info] 	List(2.13.6)
[info] output2_13 / crossScalaVersions
[info] 	List(2.13.6)
[info] rules2_13 / crossScalaVersions
[info] 	List(2.13.6)
[info] testsTarget2_11 / crossScalaVersions
[info] 	List(2.11.12)
[info] input2_13 / crossScalaVersions
[info] 	List(2.13.6)
[info] input2_12 / crossScalaVersions
[info] 	List(2.12.15)
[info] rules2_12 / crossScalaVersions
[info] 	List(2.12.15)
[info] testsTarget3 / crossScalaVersions
[info] 	List(2.12.15)
[info] input3 / crossScalaVersions
[info] 	List(3.1.0)
[info] output3 / crossScalaVersions
[info] 	List(3.1.0)
[info] rules2_11 / crossScalaVersions
[info] 	List(2.11.12)
[info] input2_11 / crossScalaVersions
[info] 	List(2.11.12)
[info] testsTarget2_12 / crossScalaVersions
[info] 	List(2.12.15)
[info] output2_12 / crossScalaVersions
[info] 	List(2.12.15)
[info] crossScalaVersions
[info] 	List(2.12.14)
sbt:scalafix-organize-imports> tests/crossScalaVersions
[info] testsTarget3 / crossScalaVersions
[info] 	List(2.12.15)
[info] testsTarget2_13 / crossScalaVersions
[info] 	List(2.13.6)
[info] testsTarget2_12 / crossScalaVersions
[info] 	List(2.12.15)
[info] testsTarget2_11 / crossScalaVersions
[info] 	List(2.11.12)
[info] tests / crossScalaVersions
[info] 	List(2.12.14)

We could either try to align the default crossScalaVersion, or simply remove the + which is no longer needed in the project matrix. I think we should go for the latter, which I missed in #179 / #190.

@mlachkar
Copy link
Author

mlachkar commented Nov 4, 2021

Thanks @bjaglin for finding a solution. @liancheng is there something still blocking ? thanks!

@liancheng
Copy link
Owner

No, I'll cut a release soon!

@liancheng
Copy link
Owner

Haven't drafted the release notes yet, but I've published the v0.6.0 release. See https://github.com/liancheng/scalafix-organize-imports/runs/4112135650

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants