-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple exclude files per version to be loaded from a directory
So, instead of creating a single mima-filters/10.1.5.backwards.excludes file to which everyone appends, you can now create a directory with the same name containing multiple exclude files per change like that: mima-filters/10.1.5.backwards.excludes/pr1234.excludes mima-filters/10.1.5.backwards.excludes/pr5678.excludes etc. This will prevent the common merge conflicts when everyone tries to append to the same file when in fact the ordering of entries is not interesting.
- Loading branch information
Showing
9 changed files
with
69 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-dir-per-version/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mimaPreviousArtifacts := Set(organization.value %% name.value % "0.0.1-SNAPSHOT") |
1 change: 1 addition & 0 deletions
1
...in/src/sbt-test/sbt-mima-plugin/backward-filters-from-dir-per-version/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % System.getProperty("plugin.version")) |
1 change: 1 addition & 0 deletions
1
...s-from-dir-per-version/src/main/mima-filters/0.0.1-SNAPSHOT.backwards.excludes/a.excludes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.foz") |
1 change: 1 addition & 0 deletions
1
...s-from-dir-per-version/src/main/mima-filters/0.0.1-SNAPSHOT.backwards.excludes/b.excludes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.baz") |
1 change: 1 addition & 0 deletions
1
...s-from-dir-per-version/src/main/mima-filters/0.0.1-SNAPSHOT.backwards.excludes/c.excludes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.bar") |
6 changes: 6 additions & 0 deletions
6
.../sbt-test/sbt-mima-plugin/backward-filters-from-dir-per-version/src/main/scala/v1/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class A { | ||
def foo = 1 | ||
def bar = foo | ||
def baz = foo | ||
def foz = foo | ||
} |
3 changes: 3 additions & 0 deletions
3
.../sbt-test/sbt-mima-plugin/backward-filters-from-dir-per-version/src/main/scala/v2/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class A { | ||
def foo = 1 | ||
} |
13 changes: 13 additions & 0 deletions
13
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-dir-per-version/test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
|
||
# filters are read from file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaBackwardIssueFilters := Map.empty | ||
-> mimaReportBinaryIssues |