tek / splain

better implicit errors for scala
MIT License
370 stars 28 forks source link

Switch to gradle for 1.0.0-2.13.6 release #63

Closed tribbloid closed 2 years ago

tribbloid commented 3 years ago

it appears that the latest sbt 1.5.5 is still using scala 2.12.14. Due to its design flaw it will always cause a classpath contamination issue:

https://stackoverflow.com/questions/27886370/how-to-have-sbt-plugin-exclude-its-dependency

There is no hope to fix it. Since 1.0.0 is targeting scala 2.13.6+, I don't see a point for keep using it in production. We should switch to gradle which is much more stable.

I'll also seek to swap out specs2 with the more stable scalatest if necessary.

Please let me know what you think.

tek commented 3 years ago

does that mean sbt will pull in 2.12 libraries when building with 2.13?

tribbloid commented 3 years ago

The entire scala 2.12 library was pulled on installation.

It is included in the classpath of the "project" submodule when being used, which seems to confuse a lot of IDE (IDEA, VSCode, bloop/metal). So technically it is not a "contamination", just an instance of autocompletion server not complex enough to segregate the two

tribbloid commented 3 years ago

I've made the change in a separate branch and it seems to sidestepped the problem. There is still no Specs2 runner in gradle tho (this will be fixed in Specs2 5 release)

I'll just proceed with moving to ScalaTest. One advantage you can't find in Specs2 with any IDE is the shortcut to run a single test case quickly (the green triangle in the following screenshot)

Screenshot from 2021-10-05 18-40-54

tribbloid commented 2 years ago

The IDE team is already engaged in fixing the contamination:

https://youtrack.jetbrains.com/issue/SCL-19566

But it may take some time

tek commented 2 years ago

so we don't have to migrate?

tribbloid commented 2 years ago

No, the only disadvantage will be not being able to debug properly until they fix the bug.

But the gradle version seems to be equally capable, I've committed to the branch 1.0.0/gradle.

Would you like to git checkout into an independent directory, open with neovim, and tell me your decision? To be honest I'm a fan of neither, they are both flawed but are still better than Haskell cabal :)

tribbloid commented 2 years ago

hmmm, I'm also curious about how neovim debugger circumvent this problem (if it ever has a debugger)

tek commented 2 years ago

that's fine, go ahead. I haven't tried debugging with neovim

tribbloid commented 2 years ago

Thanks a lot, the die is cast. Closing