-
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
go-modularize packages (part I) #1622
base: master
Are you sure you want to change the base?
Conversation
@Roasbeef would love to get your input on this- I know lnd has some similar properties and would be curious if you'd tried this over there |
Pull Request Test Coverage Report for Build 301814101Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
02de614
to
3a4496d
Compare
This initializes Go11 modules in the following packages: * btcec * chaincfg * chaincfg/chainhash * wire The primary motivation behind this step is to be able to introduce breaking changes to packages without doing a MAJOR semver bump to btcd.
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.
OK
Leaving unmerged for another day or two in case anyone else wants to review. Once merged, someone remind me to make tags please! |
I believe @jalavosus had looked into doing something similar @xplorfin so would love to get his thoughts. Also, I've had limited success with this kind of project setup so I wanted to run a test. I setup a repo here with a This could be something on my end/my misunderstanding of how gomodules work. My main concern here relates to golang/go#30354.
I had an issue earlier this week and have a concise explanation of the effects of |
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.
See above
@jakesyl Regarding the error, maybe you need to create a tag called |
@onyb on btcd? Possibly - this is kind of my concern. In my experience the effects of Also, would that mean we'd have to tag every subfolder on release? Btw - if you have an example of another go library that implements this would love to take a look. I've looked at a few different tutorials around this. Most of the ones I've looked at either aren't libraries or have no interdependencies between modules because of the versioning issue. @ckeyes88 probably articulated this best: If there's a way to do it, I'm super for it since btcutil pulling in btcd isn't ideal. |
One more thing I'll add, it does look like lnd has tried this approach (see: lightningnetwork/lnd#2602) in a few different places which definitely makes me more comfortable. There's only one case of them doing this with a replace |
Motivation
There are two main motivations of this issue:
MAJOR
semver bump to btcd.btcd
module, and instead import only the necessary ones.Candidates
I have narrowed down the scope of this PR to the following packages:
btcec
chaincfg
chaincfg/chainhash
wire
These packages are the ones that are often imported in third-party packages and are isolated enough for a good first version. For the long-term objective of using modules in btcutil, that'd need navigating some circular dependency mess.
Action points
Once this is merged, we need to create some Git tags to bootstrap the initial versions (I chose
v0.1.0
). If Concept ACK, can someone with commit access create the following tags? (cc: @jcvernaleo or @jakesyl)btcec/v0.1.0
chaincfg/v0.1.0
chaincfg/chainhash/v0.1.0
wire/v0.1.0