Comments (8)
Another example:
Let's say we decide to add some functions to an interface; let's say routing. All of our implementations implement that functions, so it is not a problem, but it is still a breaking change. If all of our implementations were implementing that function, we would not see failing tests.
from go-libp2p-core.
My point is to have the tooling to detect and know that there is a breaking change. I'm not proposing policy about these changes.
I've created #40 the PR contains an example of breaking change in a separate commit, to showcase what tooling gives us.
This is entirely off topic:
I'd also like to point out much of the grief we're experiencing is due to the multirepo approach to modularity via code segregation.
I disagree with it very strongly. It shows us, there is a considerable cost of having an unstable API.
from go-libp2p-core.
I think it's simpler than that. Just having a CI build on https://github.com/libp2p/workspace-go-libp2p that:
- refreshes all HEADs.
- runs
./workspace.sh local
to add thereplace
directives. - runs a full build (
git submodule foreach "go build ./..."
) should be enough.
from go-libp2p-core.
That wouldn't prevent breakages on interfaces that are only used by external applications.
from go-libp2p-core.
That wouldn't prevent breakages on interfaces that are only used by external applications.
Don't we exercise those in tests? Wouldn't those break there?
from go-libp2p-core.
@Kubuxu Yeah, indeed we do have two surfaces for breakage.
- I do believe we need mechanisms to detect API breakage first internally, then we can bother to produce reporting for external breakage.
- Following the advice in https://blog.merovius.de/2015/07/29/backwards-compatibility-in-go.html == ossification from the get-go. The article does make a valid point, but software is in continuous evolution (as the author recognises). Some counterarguments:
- Developers embedding types and interfaces directly know what the risks of that practice are.
- The practice of finding your users via godoc.org and continuously integrating upstream changes is interesting, but does not scale, and it encourages a spirit of "it's ok to break things, because we can warn the people who depend on us".
- We need to apply CI internally first, as I've suggested.
- libp2p is at version v0; it will continue to evolve heavily.
I think what would've helped in #23 #37 #38 libp2p/go-libp2p#678 is continuous master integration in workspace-go-libp2p. gocompat is a nice addition, but we have a more fundamental flaw in our software engineering here.
I'd also like to point out much of the grief we're experiencing is due to the multirepo approach to modularity via code segregation. 💣
from go-libp2p-core.
I'm also not dismissing a need for org-wide CI, but in my opinion, that effort is orthogonal to this one.
from go-libp2p-core.
In my opinion, the reason for these breaking changes was because people creating them and people accepting them weren't reviewing them for that scope.
In my opinion, if we can replace a part of the review process with tooling we should. Especially if we have an experience that human review process fails in this given case.
from go-libp2p-core.
Related Issues (20)
- Host event bus does not emit EvtPeerConnectednessChanged HOT 5
- Error in using libp2pquic.NewTransport with libp2p.Transport HOT 2
- Record envelope protobuf does not match spec HOT 2
- Add a `ClearDeadline` API HOT 4
- v0.7.0 breaks backward compatibility for multiple packages HOT 3
- add WithStat option for host.NewStream HOT 3
- Closing streams does not transmit all data HOT 1
- Unable to marshal / unmarshal AddrInfo within my struct HOT 4
- flaky TestResetBandwidthCounter test HOT 1
- How to know the conn has been closed
- What happened to the method in **helps**? HOT 1
- Reliable Notifiee events HOT 1
- looks unsafe HOT 2
- routing.go HOT 1
- How to convert PrivKey to crypto/ecdsa.PrivateKey? HOT 1
- Requesting release 0.16 with "update btcec dependency" change HOT 4
- btcec update leads to `go mod tidy` failure HOT 9
- extend `peer.Set` with the Remove method HOT 4
- Unable to know data on the connected node HOT 1
- use a mock clock in bandwidth counter tests HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libp2p-core.