-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
go 1.8 #10048
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 1.8 #10048
Conversation
That was fast :)
|
Formula/go.rb
Outdated
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.
probably need to update the comment here
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.
Thanks, fixed 👍
The
|
Strange. Anyone else getting this? |
@ttaylorr I was able to replicate this failure. I am not entirely sure why it's happening yet, it looks like there is some issue with |
|
The caveat should also be edited, as there is a functionality change in GOPATH:
|
Formula/go.rb
Outdated
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.
Unless 1.7 has known issues bootstrapping 1.8 I'd probably leave this how it was. The original intention here was that no version of go
should be bootstrapped by the same version of go
, so that if there's a problem bootstrapping you know it's with the new from-source release rather than having to work out whether the problem is the binary or the from-source part.
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.
(I appreciate when I tweaked this blob of code I made the comment confusing as all hell, apologies)
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.
I think this argument makes more sense to me than #10048 (comment). Fixed!
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.
Makes sense when you put it this way ;)
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.
Apologies 😸. I've noticed with some pain that since I left the project code comments I added as a maintainer made sense sometimes exclusively to me, heh.
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.
I don't think I really follow this argument. Does upstream actually say x.y should not be built with x.y itself or is this brew superstition?
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.
It's just a tool we've used in the past for easier build failure debugging, but upstream themselves the last time I checked used Go 1.4 to bootstrap. We moved off of that system because for a while the 1.4 branch died on Sierra, which may or may not still be the case.
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.
(More broadly I think you might as well scrap the code comment and replace it with something along the lines of don't update this unless this version cannot bootstrap the new version, and effectively pin it in place)
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.
I believe they've fixed that (definitely MacPorts has). At some point (not this PR, of course), I think we should consider building our own 1.4 bootstrapper from source and avoid the upstream binaries altogether.
In any case, assuming for the sake of argument that I accept that this use-the-prior-version-to-bootstrap approach is useful, why 1.7 not 1.7.5?
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.
I believe they quietly cut a new release, and we just never moved back to 1.4 because 1.7 wasn't causing any issues and changes to the go
formula are rarely simple 😄, but I could be misremembering. I know there was talk of cutting a new 1.4 release simply for the sake of bootstrapping at least.
But yes, you're correct that having a gobootstrap
or such from source would've allowed us to patch the 1.4 build failure at the time and keep using that branch for the process. The downside is that building even Go 1.4 is not ultra-quick in comparison to the existing process, and there hasn't been many clear upsides in the past.
In any case, assuming for the sake of argument that I accept that this use-the-prior-version-to-bootstrap approach is useful, why 1.7 not 1.7.5?
No reason at all. I simply wanted to avoid the confusion & hassle of people updating the bootstrap for every minor release. Less moving parts, less potential for breakage, etc etc.
+1 |
👍 |
This is the issue, looks like |
Alternatively the formula could be modified to always set |
I was unable to confirm that this is a correct fix. After bumping the version in diff --git a/Formula/godep.rb b/Formula/godep.rb
index 6ee335ae..a9c003cc 100644
--- a/Formula/godep.rb
+++ b/Formula/godep.rb
@@ -25,7 +25,7 @@ class Godep < Formula
(testpath/"Godeps/Godeps.json").write <<-EOS.undent
{
"ImportPath": "github.com/tools/godep",
- "GoVersion": "go1.7",
+ "GoVersion": "go1.8",
"Deps": [
{
"ImportPath": "golang.org/x/tools/cover", and rebuilding it from source: /u/l/H/L/T/h/homebrew-core (master!) $ go version
go version go1.8 darwin/amd64
/u/l/H/L/T/h/homebrew-core (master!) $ brew install --build-from-source godep
Updating Homebrew...
==> Using the sandbox
==> Downloading https://github.com/tools/godep/archive/v79.tar.gz
Already downloaded: /Users/ttaylorr/Library/Caches/Homebrew/godep-79.tar.gz
==> go build -o /usr/local/Cellar/godep/79/bin/godep
🍺 /usr/local/Cellar/godep/79: 3 files, 8.9M, built in 4 seconds
/u/l/H/L/T/h/homebrew-core (master!) $ godep version
godep v79 (darwin/amd64/go1.8) the tests still failed: /u/l/H/L/T/h/homebrew-core (master!) $ brew test --verbose godep
Testing godep
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20170216-14330-1dawnu0.sb /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/godep.rb --verbose
==> /usr/local/Cellar/godep/79/bin/godep restore
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]: Current Directory: /private/tmp/godep-test-20170216-14331-1fam7n9
godep: [WARNING]: $GOPATH: /private/tmp/godep-test-20170216-14331-1fam7n9 @twexler -- were you able to spot anything I missed? |
I just looked and fossies.org doesn't have the 1.8 package yet either. |
This is a bit backwards(the first test is not the bottled version) because I screwed up, but I believe this demonstrates that
EDIT: Cleaned up my shell log |
Heh, the test actually passed there on
Running this process:
diff --git a/Formula/godep.rb b/Formula/godep.rb
index 6ee335aec5..bdf5d8459c 100644
--- a/Formula/godep.rb
+++ b/Formula/godep.rb
@@ -3,6 +3,8 @@ class Godep < Formula
homepage "https://godoc.org/github.com/tools/godep"
url "https://github.com/tools/godep/archive/v79.tar.gz"
sha256 "3dd2e6c4863077762498af98fa0c8dc5fedffbca6a5c0c4bb42b452c8268383d"
+ revision 1
+
head "https://github.com/tools/godep.git"
bottle do
@@ -25,7 +27,7 @@ class Godep < Formula
(testpath/"Godeps/Godeps.json").write <<-EOS.undent
{
"ImportPath": "github.com/tools/godep",
- "GoVersion": "go1.7",
+ "GoVersion": "go1.8",
"Deps": [
{
"ImportPath": "golang.org/x/tools/cover",
Produces no problems locally. |
Sweet! Excited for this. |
Note: Only the ones that use |
Thanks. I gathered from running |
@ttaylorr You should also add a comment to |
Thanks again, all. For posterity, Go 1.8 still supports Mountain Lion, but:
(ref: https://beta.golang.org/doc/go1.8#ports) So Go 1.9 will need to update this in the formula. |
Formula/go.rb
Outdated
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.
Is it all version bumps, or just major/minor?
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.
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.
I assume it would vary between formulae, so I left it unspecific.
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.
Ah, okay.
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.
Having patch version bumped go myself multiple times, these extra revision bumps on dependant formula were not needed. Based on what we know now, I'd recommend clarifying this to just major/minor.
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.
In the case of godep, it's currently required every time even on revision bumps. The other revision bumps in this PR are probably unnecessary altogether.
Formula/go.rb
Outdated
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.
s/those formula's revision./those formulas' revisions./
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.
If you want to be particularly consistent about it, Homebrew's preferred plural for formula is formulae 😉, so something like:
This can be done by bumping the revision of the `brew uses go` formulae.
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.
Also this comment should ideally be at the top of the formula rather than nested, and I'd perhaps limit it to "major version bumps" given those are the most problematic. But at this point I'd be tempted to leave it and let @ilovezfs tidy up when he merges 😈
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.
Thanks for the suggestions. I don't want to bikeshed this longer than we need to, so I'm alright with deferring to @ilovezfs's judgement, if he's OK with contributing here.
I've ticked the 'Allow edits from maintainers.' box, so anyone from Homebrew core is welcome to touch this.
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.
Probably no comment is needed since nothing has changed.
Looking forward to this upgrade! |
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.
Looks like bootstrap wasn't updated to
https://storage.googleapis.com/golang/go1.8.darwin-amd64.tar.gz
Formula/go.rb
Outdated
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.
This appears to be the hash of the tree not the top commit, and I think specifying branch at all is actually incorrect, since that's really only for head specs that use a branch other than master.
Formula/go.rb
Outdated
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.
by default
Formula/go.rb
Outdated
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.
Probably no comment is needed since nothing has changed.
@DomT4 PR refreshed. |
👍 LGTM, for what that's worth these days heh. |
I still have your badge in the drawer whenever you'd like it back :) |
But retirement has been such a quiet place where I get to randomly work on my own mildly obscure side projects 🙈. But the desire to put up with me again, which I don't quite understand why you would want to heh, is appreciated as always. |
@ttaylorr thanks for the PR! 🚀 |
🙇♂️ |
FWIW .... Given this error message:
The current directory ( |
That's usually a warning (not an error) that occurs when we use the symlink black magic. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?