-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[release-v0.22.1] multi: Switch to chaincfg/chainhash module. #1851
Conversation
This removes the chaincfg/chainhash package in favor of using the module to resolve issues with the go dependency tooling due to a conflict between the package and module of the same name.
Pull Request Test Coverage Report for Build 2237026905
💛 - Coveralls |
+1 for branching off of 0.22, there're quite a lot of core changes in master due to the big taproot push we went through earlier this year. In the PR body:
Should be btcd + btcctl ;) |
Oops. Finger memory... Updated. |
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 🥨
|
||
// appPreRelease MUST only contain characters from semanticAlphabet | ||
// per the semantic versioning spec. | ||
appPreRelease = "beta" | ||
appPreRelease = "" |
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.
So btcd
is now officially out of beta? 🤩
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.
Something I highly suggest is to separate the product version (aka the release versions of btcd) from the go module versions. I know it might be a little annoying, but Go hijacked semver for its modules and, as things like this show, module versions really need to be independent.
The model I use for dcrd that has worked out really well is for each release to create a release-vX.Y
branch and on that branch update the version info to remove the pre-release details, remove any overrides from go.mod
, etc and tag the release-vX.Y.Z
commit(s) on that release branch accordingly. Then, bump to the next pre-release version on the master branch where development continues as normal.
That way all releases have their own branch that you can back port to if it is necessary and it is decoupled from the go module version(s).
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.
Something I highly suggest is to separate the product version (aka the release versions of btcd) from the go module versions.
Yeah I'm slowly coming around to this realization myself. Takes a bit more work, but worth it not to cause headaches for consumers of the modules.
Currently, there are some issues for consumers importing the main
github.com/btcsuite/[email protected]
module:github.com/btcsuite/btcd
end up with an old and broken versionv0.18.0
since all of the later tags are pre-release versions and the go tooling prefers release tags over pre-release tagsgithub.ghproxy.top/btcsuite/[email protected]
along with the newgithub.ghproxy.top/btcsuite/btcd/btcec/v2
orgithub.ghproxy.top/btcsuite/btcd/chaincfg/chainhash
modules will have conflicts due to the existence of both the package and the module at the same pathThese all boil down to a couple of things:
v0.22.0-beta
is seen as beforev0.18.1
, so currently anyone just importing or doing a plaingo get github.com/btcsuite/btcd
is going to attempt to getv0.18.1
which is a broken version.v0.22.0-beta
haschaincfg/chainhash
as a package, but there is also now a separate module with the same path.This consists of the following changes which will resolve all of the aforementioned issues:
v0.22.0-beta
tag so that no new code that is not ready to be released is introducedchaincfg/chainhash
packagego.mod
to use thechaincfg/chainhash
module insteadOnce this is merged, all that will be needed is to create a
v0.22.1
tag at theUpdate CHANGES file for 0.22.1 release.
commit.Closes #1839.