-
Notifications
You must be signed in to change notification settings - Fork 43
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 it possible to and do build against a scalafix SNAPSHOT #211
Conversation
a2cf9e2
to
2150e2f
Compare
val suite = new AbstractSemanticRuleSuite with FunSuiteLike { | ||
override val props = TestkitProperties.loadFromResources() | ||
override val isSaveExpect = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-trivial usage of SemanticRuleSuite
that https://github.com/scalacenter/scalafix/pull/1395/files won't cover. See also scalacenter/scalafix#1147.
8cdca64
to
cdc31bf
Compare
- clients that have sonatype public in the metabuild and do not override scalafixResolvers can resolve a SNAPSHOT scalafix as sonatype snapshots is added by default - fix failing tests by sticking to the plugin default - fix failing scripted by removing unnecessary scalafixResolvers overrides or adding the sonatype snapshots resolver when scalafix is resolved directly - fix breaking changes in scalafix
@@ -27,6 +27,11 @@ object ScalafixTestkitPlugin extends AutoPlugin { | |||
} | |||
import autoImport._ | |||
|
|||
override def buildSettings: Seq[Def.Setting[_]] = | |||
List( | |||
resolvers += Resolver.sonatypeRepo("snapshots") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScalafixTestkitPlugin clients of a SNAPSHOT sbt-scalafix must resolve from sonatype snapshots both scalafix-testkit for the test project (where that sbt plugin is enabled) AND scalafix-core for the actual rules project, thus the need for impacting the entire build and not just the project settings.
Follows #210
It's useful to build and run all scripted tests against a scalafix SNAPSHOT to avoid getting (late) surprises during the 2-step (scalafix/sbt-scalafix) release phase.
Most of the users running SNAPSHOT versions of sbt-scalafix should be able to use one that depends on a SNAPSHOT scalafix since they must already have sonatype snapshots in the metabuild and the default
scalafixResolvers
will re-resolve scalafix through sonatype snapshots via the embedded coursier.