-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make simulacrum a compile time only dependency #1638
Conversation
Nice trick! 👍 on build green |
Oh nice. @mpilquist does this look good to you? |
Yes definitely, this has been on my list of things to mention for over a year but I kept forgetting. :) |
Codecov Report
@@ Coverage Diff @@
## master #1638 +/- ##
=======================================
Coverage 93.37% 93.37%
=======================================
Files 240 240
Lines 3941 3941
Branches 144 144
=======================================
Hits 3680 3680
Misses 261 261 Continue to review full report at Codecov.
|
Thanks @peterneyens and @yilinwei! |
Discussion about more direct support for this in SBT here. Issue here: sbt/sbt#2503. |
This is another change that makes upgrading to sbt 1.0 easier and which is compatible with sbt 0.13. With sbt 1.0 the following line in `commonSettings`: ``` ivyConfigurations += config("compile-time").hide ``` leads to this exception: ``` [info] Loading settings from build.sbt,version.sbt ... [info] Resolving key references (15580 settings) ... [error] java.lang.IllegalArgumentException: requirement failed: id must be capitalized: commonSettings [error] at scala.Predef$.require(Predef.scala:277) [error] at sbt.librarymanagement.Configuration.<init>(Configuration.scala:19) [error] at sbt.librarymanagement.Configuration$.of(Configuration.scala:72) [error] at $61255add5b0123fd7403$.$anonfun$commonSettings$9(build.sbt:47) ``` The reason why `commonSettings` is used as `id` for this "compile-time" configuration can be found in [this sbt-librarymanagement macro](https://github.com/sbt/librarymanagement/blob/53c80f076a5e9ab469037f352a4d68173140e216/core/src/main/scala/sbt/librarymanagement/ConfigurationExtra.scala#L109-L114). As the macro suggests, extracting the defintion of the `Configuration` and assigning it to a `val` fixes the error. The "compile-time" configuration was added in typelevel#1638 to remove simulacrum from the dependencies in the POM. I therefore checked that simulacrum is still not present in the POM after this change.
@yilinwei mentioned on the gitter channel that we could change the simulacrum dependency to be compile time only.