-
Notifications
You must be signed in to change notification settings - Fork 76
Conversation
As the author of #37, this seems awesome to me 😄 There are plenty of reasons to break API compatibility, but it's always nice to at least know that you're doing it |
package core | ||
|
||
import ( | ||
_ "github.com/smola/gocompat" |
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.
I read the usage instructions on the gocompat
repo, but I'm not sure I follow why we need an import for side-effects here. Isn't the CLI tool self-contained?
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.
It's how one tricks go mod
into tracking it. That way, one can run go run github.com/smola/gocompat/cmd/gocompat
and always get the right version.
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.
The build tag is made such that it isn't used for the build and as @Stebalien said. This is how one tricks gomod into tracing tooling. We use the same technique in go-ipfs and go-filecoin is doing the same.
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.
What a hack... sigh scope=test
in Maven, devDependencies
in npm.
.travis.yml
Outdated
include: | ||
- stage: "Test" | ||
script: "./compat-check" | ||
name: "Compatibility Test" |
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.
name: "Compatibility Test" | |
name: "API compatibility test" |
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.
LGTM (modulo the example breakage, of course). In practice we want to preserve the public API of any other libp2p module too. Is this worth rolling out everywhere?
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
4bc67d7
to
04ad8ae
Compare
I've removed the breaking change and changed the line. |
Resolves #39