-
Notifications
You must be signed in to change notification settings - Fork 30
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
Please restore default branch to V1 #26
Comments
I understand things are going to break. I'm happy for any suggestions on a way to move this repo forward. The implementation at the time was to meet a minimum requirement I had at the time. It's evident that it has a variety of issues with the design due to my understanding of DHCP. Even now my understanding of DHCP is getting better as I look into and resolve issues. Again open to suggestions? |
My suggestion is: set the default branch to V1 so that go get keeps working. Then, whenever you break the public API, increase the major version. See also https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher, which is applicable to Go modules (which might be a good idea to start supporting), but also makes things strictly better for users who don’t use modules yet. |
Friendly ping? I’d like to unbreak my code. Have a look at https://help.github.com/articles/setting-the-default-branch/ if you haven’t dealt with the default branch setting before :) Thanks! |
I just ran into this problem too: it's broken our TravisCI build: |
So reading through the document suggested I've tagged the tip of V1 with the v1.0.0 tag. The V1 branch exists for maintenance. Is this working with go.mod or is there something more I need to do? |
Thanks for the tag, that should help with the go.mod use-case. However, the “go get” (without modules) use-case is still broken:
Could you also change the default branch please? |
The issue with that is things like godoc will point back to the default branch. When I look at repositories I expect TIP to be the latest not a branch not being actively developed. Fork the repo and point to the fork? Happy to compromise and give you a notice period if that helps? I'll switch it back until the Mid December? |
For modules, that will (eventually) be addressed with golang/go#26827. Currently, if you’d like to use multiple branches in the same repository, you’ll have to use http://labix.org/gopkg.in. Specifically: you should rename the V2 branch to v2 (lowercase), then use https://gopkg.in/d2g/dhcp4client.v2 to refer to it. This will work with godoc.org, go get, go modules, etc. The default branch should be set to v1 to keep the status quo working (ideally indefinitely). You can add a statement to the README pointing to https://github.com/d2g/dhcp4client/tree/v2. |
The default branch should be set to v1 to keep the status quo working (ideally indefinitely). I don't see other Repos doing this? I don't see this as being the standard approach where you're redirected to a different branch from default from the readme. |
An example of this practice is https://github.com/sorcix/irc. I’m sure I can find others :) |
Note that a number of other repositories don’t face the same issue because they have been using gopkg.in from the very beginning, so their existing import paths will be pointed to the (e.g.) v1 branch via gopkg.in. The situation with d2g/dhcp4client is different because the existing import paths don’t contain a reference to any branch. |
As you've pointed out this only works for projects using gopkg.in. A number of other repositories went the vendor route. Repositories without a version are expected to be v0 and therefore unstable. I'm trying to be as friendly as possible if by the book the default position should be I should just push v2 directly into the v1 branch. I've renamed the branches. It breaks the standard toolset, godoc no longer details the latest repos. I have no intention of answering this using gopkg.in as it's outside the "standard". If there is an alternative to gopkg.in in the standard go offering I'll happily look at it (like the v1, v2, tagging modules concepts). To help ease this pain. The default will remain v1 until mid December where I will revert the change back to v2 so that godoc etc works to give the API for the latest version. Maybe the tooling will have caught up by then to not make it an issue. Hopefully that's enough time for to resolve these issues? Anything else you want me to do, let me know but v2 has to be the version with the "advantages" related to being the default branch. |
Thanks for changing the default branch, I can confirm that this fixes the immediate issue.
I’m not 100% sure which tooling you refer to, but changing the API of the As you mention, there’s no expectation of backwards-compatibility with unversioned packages, so the decision is ultimately up to you. From my perspective, the friendlier way for the ecosystem is to use gopkg.in and leave the default branch as-is.
It sure is enough time, thanks. I’ll switch my code to use the now-working |
Great. The v2 branch has been coming for some time. It's not yet stable (I'm adding the missing features from the issues and pull requests), essentially it's tip but is close to where the v1 branch is functionally and the changes allow me to address some of the outstanding issues (Unicast Renews etc). I really was using this "stunt" to start this conversation and start trying to get peoples buy-in to the v2 branch. . |
Thanks for changing the default branch. This unblocks us for now. |
@rgooch I've made some wrappers to help transition. I've checkout your code and I have to change the import on the dhcp4 as I'm now directly using "github.com/krolaw/dhcp4" rather than my own fork (Not sure if this is a good idea or not). It builds ok (cross compiling etc). Let me know how you get on. @stapelberg How are you getting on? |
Thanks for checking in. I couldn’t figure out how to use the dhcp4client.v2 API and decided to instead switch to a bunch of simple glue functions that tie together gopacket and mdlayher/raw, which I already use elsewhere in my project (https://github.com/rtr7/dhcp4). |
The current default branch of V2 broke e.g. github.com/gokrazy/gokrazy/cmd/dhcp:
The text was updated successfully, but these errors were encountered: