-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
doc: contribute.html doesn't mention GOROOT_BOOTSTRAP #18545
Comments
What do you mean by unlinked? Installation is the first link provided in the intro section:
I fear that installation guide is not well highlighted on that page. What about creating a new header for "Installing from source" as the first step? |
Oh, indeed. I guess I was searching for something else on that page, like "source". But the page is still misleading. Under "Testing redux" it says:
And that links to the GOPATH documentation page, but GOPATH is totally unnecessary for hacking on the Go core. (It's only necessary for subrepos) |
On related note, something that's thrown me before (although I know too much, so it may not matter to others) is that the official 1.4 download doesn't work on Macs. You need to use the special 1.4 download link on the build-from-source page. It would be nice if either the official 1.4 download were updated, or if another one were added with an annotation on the downloads page. |
@robpike As I'm sure you already know, Go 1.6.x and most of the archived versions have issues on macOS Sierra. At the same time, all those releases should work on prior versions of macOS (< 10.12), including the official Go 1.4 download. Maybe we just need a note on the download page that macOS Sierra requires Go 1.7 or better? cross-reference to backport issue: #16352 |
I like building from 1.4. It's faster. |
I'll split the macOS issue to a separate issue: #18554. |
👍 Or perhaps the second step, as installing from source technically isn't required before discussing the idea.
Yah. There are a few links out to "How to Write Go Code". Maybe Contributing should be more self-contained? Of course that may be at odds with #17802. When Alex brought this up, it sounds like he was looking for guidance for working on the core Go code. https://groups.google.com/d/msg/golang-dev/afkXKoAd8IQ/NECZ_PWcEAAJ |
As somebody who wants to contribute code (but yet to) I was caught by this:
Using the contribution guide and following this article I was able to get the source downloaded and able to make changes but I was left wondering whether I was able to use
Using this info and his article lead me to I think the picking out the salient facts from above and adding them to the contribution guidelines may help. |
@jpudney that's a different issue, though. This one is about GOROOT_BOOTSTRAP. You could open a new issue asking for a clarification of the process of testing a new contribution. |
This issue got me as well and spend quite some time on it. Even though it is mentioned in "building from source" page, I think we should mention it on contributing page as well.
Alternatively, env variable can be set in If it's not set, you get this:
That error didn't help me much, as I thought it asked me to set Here's another error I encountered when I tried to run tests for a specific package:
I read that checking out go code should not be under your This works, though: Testing changes in individual package:Perhaps, this should go on a separate issue to make changes in contribute page, but I'll mention it here anyway. I was trying to test my changes on I was expecting my tests to fail, but they were passing. Even though my current working directory was I still run the whole test suite which is not ideal if you made small changes. Would be nice if I could a specific test: without getting the error about missing Please let me know your thoughts. |
CL https://golang.org/cl/45140 mentions this issue. |
I took a stab at this, adding a step prior to the "go get ... git-codereview" section as a working go is needed for that as well: https://go-review.googlesource.com/c/45140/ |
I've submitted for review a new contribution guide (https://go-review.googlesource.com/c/go/+/93495), that aims to simplify readability as much as possible. I'm reviewing pending issues to see how the requests would fit into the new guide. Can somebody explain me when exactly @ggirtsou you say that you get an error running
There is some code in Lines 59 to 61 in 79fe895
Lines 140 to 150 in 79fe895
So my understanding is that What am I missing? @ggirtsou, can you check why the above code doesn't work for you on your system, leaving you forced to manually set a |
You need |
Ok then it’s fair to assume that most Go contributors will be Go users in the first place and will have a Go binary installed. Building Go without Go seems a subject for |
You need to build Go from source if you want to modify it and contribute a
CL.
…On 22 February 2018 at 09:24, Giovanni Bajo ***@***.***> wrote:
Ok then it’s fair to assume that most Go contributors will be Go users in
the first place and will have a Go binary installed. Building Go without Go
seems a subject for
another page, not the contribution guide.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#18545 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA6MD0zNSnFajWj-LypBQA48oZ8Bfks5tXJebgaJpZM4LdBl->
.
|
You can build from source without GOROOT_BOOTSTRAP. What Ian says: you need it if you want to build from source WITHOUT a version of Go installed on your system, which I think it’s not a frequent scenario. |
You can build from source without GOROOT_BOOTSTRAP.
To build from source, you need to have a bootstrap compiler installed.
GOROOT_BOOTSTRAP is how say where that bootstrap compiler lives.
…On 22 February 2018 at 10:52, Giovanni Bajo ***@***.***> wrote:
You can build from source without GOROOT_BOOTSTRAP. What Ian says: you
need it if you want to build from source WITHOUT a version of Go installed
on your system, which I think it’s not a frequent scenario.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18545 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcAy0IX7iMJa4qbblS_fVHAy0sT88jks5tXKxYgaJpZM4LdBl->
.
|
But To make sure we're talking of the same thing, I tried with a clean Ubuntu (through a standard Docker image):
So I was able to:
all without ever specifying Thus, I think that |
The default |
Change https://golang.org/cl/96455 mentions this issue: |
I've just mailed a CL for adding support for default |
CL 57753 added support to make.bash and make.rc to default GOROOT_BOOTSTRAP to 'go env GOROOT'. This patch does the same in make.bat for Windows. Updates #18545 Fixes #28641 Change-Id: I9152cc5080ed219b4de5bad0bd12d7725422ee1a Reviewed-on: https://go-review.googlesource.com/c/go/+/96455 Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Users should be able to find everything they need to know to contribute to Go by reading contribute.html.
There's no path from that page to learning about GOROOT_BOOTSTRAP, since GOROOT_BOOTSTRAP is only mentioned from the unlinked https://golang.org/doc/install/source
Fix.
The text was updated successfully, but these errors were encountered: