You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Btcd seems like it would be a good tool for experimenting with the Bitcoin's blockchain, and I'm wondering if you have any thoughts on how to properly fork it?
I've looked at the code and the btcd repo contains references to other repos in the github.com/btcsuite project, which is fine, but most of those have back-references to data structures in btcd, so they cannot be separated or exist as stand-alone. For example btcutil/address.go back-references github.com/btcsuite/btcd/btcec and github.com/btcsuite/btcd/chaincfg so it cannot really be used outside btcd, and there are a lot of such examples all over the place, probably for every single repo in btcsuite.
So it seems like all of those modules would need to also be forked, and their imports fixed, to have a working fork of btcd? Because if I just change the import paths in the btcd repo to not include "github.com/btcsuite/btcd/..." but "github.com/myfork/btcd/..." there are still all those other files from btcsuite repos which reference the original module (btcsuite/btcd) instead of the fork (myfork/btcd).
Any ideas?
The text was updated successfully, but these errors were encountered:
Unless you are trying to create a derivative project, fork it on github, push to your fork, but keep the code under the canonical location in your GOPATH. If you want others to be able to build your changes, I would modify the README to include instructions for fetching or checking out your forked branch to the normal location.
This is just a limitation of workspace-based build systems like the go tool and there's nothing that can be done about this without moving to alternative tooling, e.g. gb.
Having the same issue a week now. I indeed have to create a derivative project of btcd, as I need to test a slightly adjusted protocol. There seems to be no way to create a fork while keeping all dependencies intact.
EDIT: Found a way to do it. Stick with the glide.lock file that is provided here and in btcwallet. Fork all relevant repos. Note that the 'version' hashes in glide.lock will still point to previous versions. Rollback all repos to the version that is specified in the current glide.lock (by using the commit hashes). Now find-and-replace all imports to match your repo, and commit your changes to your own repos. Finally, update the version hashes in the glide.lock file to match with your last commit. This works 👍 @ivoras
Hello,
Btcd seems like it would be a good tool for experimenting with the Bitcoin's blockchain, and I'm wondering if you have any thoughts on how to properly fork it?
I've looked at the code and the btcd repo contains references to other repos in the github.com/btcsuite project, which is fine, but most of those have back-references to data structures in btcd, so they cannot be separated or exist as stand-alone. For example
btcutil/address.go
back-referencesgithub.com/btcsuite/btcd/btcec
andgithub.com/btcsuite/btcd/chaincfg
so it cannot really be used outside btcd, and there are a lot of such examples all over the place, probably for every single repo in btcsuite.So it seems like all of those modules would need to also be forked, and their imports fixed, to have a working fork of btcd? Because if I just change the import paths in the btcd repo to not include "github.com/btcsuite/btcd/..." but "github.com/myfork/btcd/..." there are still all those other files from btcsuite repos which reference the original module (btcsuite/btcd) instead of the fork (myfork/btcd).
Any ideas?
The text was updated successfully, but these errors were encountered: