Comments (9)
Looking at this now.
from go-libp2p-core.
Can we fix our CI globally to do 1.17 compat tidy?
We've had this problem elsewhere too.
from go-libp2p-core.
Can we fix our CI globally to do 1.17 compat tidy?
We could, but the problem is that every user of go-libp2p would not be able to run a normal go mod tidy
any more.
I don't really understand why the Go tool would care about 1.16 when the go.mod
file clearly states go 1.17
(as all our go.mod
files do), but apparently that's what the Go team decided.
from go-libp2p-core.
I found another change that makes the errors go away - see libp2p/go-libp2p#1524 - but I'm yet to understand exactly what's going on.
from go-libp2p-core.
Adding the following file to go-libp2p works:
//go:build !go1.17
// +build !go1.17
package libp2p
import (
_ "github.com/btcsuite/btcd/chaincfg"
)
and then making sure that go.mod
has require github.com/btcsuite/btcd v0.22.1
.
from go-libp2p-core.
This could also be applied in this repo: #254
Not sure where the right place for this to live would be. Thoughts?
from go-libp2p-core.
Given what I've read so far here's my guess.
Before
go-libp2p
depends on [email protected]
and [email protected]
.
github.com/libp2p/go-libp2p github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
This is fine, these two are compatible (in terms of what go mod tidy
does i.e. dep resolution model of go 1.16) with each other.
The only version of chainhash
that is used is the one that comes as a subdir of btcd
.
After
go-libp2p-core
changes dependency on [email protected]
to a dependency on btcd/btcec/v2 v2.1.3
. Important note: btcec
depends on released chainhash
(v1.0.0
to be exact).
go-libp2p
still depends on [email protected]
and [email protected]
.
github.com/libp2p/go-libp2p github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
github.com/libp2p/[email protected] github.com/btcsuite/[email protected]
But now it also depends on [email protected]
.
github.com/libp2p/[email protected] github.com/btcsuite/btcd/btcec/[email protected]
And transitively, it also starts depending on released [email protected]
.
github.com/btcsuite/btcd/btcec/[email protected] github.com/btcsuite/btcd/chaincfg/[email protected]
Now we have 2 incompatible versions of chainhash
in chain, one from btcd
's subdir and one from a proper v1.0.0
release.
Resolution
We can either force replace btcd
to v0.22.1
which doesn't have chainhash
subdir at all anymore, or we can upgrade btcd
in all of these:
libp2p/go-libp2p
libp2p/go-libp2p-quic-transport
libp2p/go-libp2p-resource-manager
libp2p/go-libp2p-testing
libp2p/go-libp2p-tls
libp2p/go-libp2p-yamux
The latter seems cleaner but it's much more work.
from go-libp2p-core.
This could also be applied in this repo: #254
Not sure where the right place for this to live would be. Thoughts?
Nice! I tested it locally and it seems to do the trick :)
Testing
I checked out your branch in go-libp2p-core
and updated the reference in go-libp2p
's go.mod
to point at the local checkout. After this, I ran go mod tidy
and it didn't complain anymore.
from go-libp2p-core.
I think maybe #252 (comment) fits better in go-libp2p because we'd be able to remove it once/if we stop transitively depending on lower versions?
Either way, I think yours is better than my replace all.
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
- 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.