Skip to content
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

Explain MiMa use for contributors #1751

Merged
merged 2 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- env: CMD="docs/paradox"
name: "Create site with Paradox"
- env: CMD="mimaReportBinaryIssues"
name: "Check binary compatibility"
name: "Check binary compatibility (MiMa)"

- stage: test
env:
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,32 @@ In case of questions about the contribution process or for discussion of specifi
We've collected a few notes on how we would like Alpakka modules to be designed based on what has evolved so far.
Please have a look at our [contributor advice](contributor-advice.md).


## Binary compatibility (MiMa)

Binary compatibility rules and guarantees are described in depth in the [Binary Compatibility Rules
](https://doc.akka.io/docs/akka/snapshot/common/binary-compatibility-rules.html) section of the Akka documentation.

Akka projects use [MiMa](https://github.com/lightbend/mima) (which originally was called Lightbend Migration Manager) to
validate binary compatibility of incoming pull requests. In the Travis build step "Check binary compatibility", you may see
an error like this:

```
[info] akka-stream: found 1 potential binary incompatibilities while checking against com.typesafe.akka:akka-stream_2.12:2.4.2 (filtered 222)
[error] * method foldAsync(java.lang.Object,scala.Function2)akka.stream.scaladsl.FlowOps in trait akka.stream.scaladsl.FlowOps is present only in current version
[error] filter with: ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.stream.scaladsl.FlowOps.foldAsync")
```

In such situations it's good to consult with a core team member if the violation can be safely ignored (by adding the above snippet to `<module>/src/main/mima-filters/<latest-version>.backwards.excludes`), or if it would indeed break binary compatibility.

Situations when it may be fine to ignore a MiMa issued warning include:

- if it is concerning internal classes in package `impl` or `internal`
- add eg. `1.0.x.backwards.excludes` with `ProblemFilters.exclude[Problem]("akka.stream.alpakka.<module>.impl.*")` to ignore all internal changes
- if it is touching anything marked as `@InternalApi`

The binary compatibility of the current changes can be checked by running `mimaReportBinaryIssues` in sbt.

## Pull Request Requirements

For a Pull Request to be considered at all it has to meet these requirements:
Expand Down