|
|
Chromium Code Reviews|
Created:
4 years, 9 months ago by mithro Modified:
4 years, 6 months ago CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, andrew.wang, todd, tandrii+luci-go_chromium.org, M-A Ruel Base URL:
git+ssh://github.com/mithro/luci-go.git@patch-1 Target Ref:
refs/heads/master Project:
luci-go Visibility:
Public. |
Descriptionluci-go: Improving setup instructions in README.md
Point to the "Chrome Infra Go Area" and the quicksetup script.
R=maruel@chromium.org
Patch Set 1 #
Total comments: 3
Patch Set 2 : Updating with quickstart.sh script #Patch Set 3 : Fixing s/quicksetup.sh/quickstart.sh/ #Patch Set 4 : Fixing the get of luci-go code. #Patch Set 5 : Fix depot_tools in PATH. #Patch Set 6 : Using infra/go method. #
Total comments: 6
Patch Set 7 : Moving quicksetup script to infra repo. #Patch Set 8 : Fix the quickstart command. #Messages
Total messages: 30 (8 generated)
Hi Marc, Small change to improve the README for noobs like me who don't use Go frequently (and to partially test the contributing process here). Tim 'mithro' Ansell
tandrii@chromium.org changed reviewers: + tandrii@chromium.org
LGTM, thanks for contribution. Feel free to use CQ (commit box checkbox) to land your change.
The CQ bit was checked by tansell@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807463005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807463005/1
The CQ bit was unchecked by commit-bot@chromium.org
CLs for remote refs other than refs/heads/master must contain NOTRY=true and NOPRESUBMIT=true in order for the CQ to process them
https://codereview.chromium.org/1807463005/diff/1/README.md File README.md (right): https://codereview.chromium.org/1807463005/diff/1/README.md#newcode12 README.md:12: `$GOROOT` / `$GOPATH` and adding `$GOROOT/bin:$GOPATH/bin` to your `$PATH`. I disagree about recommending to set GOROOT. Normally you should not have to set it, only GOPATH is needed. The equivalent of GOROOT needs to be added to PATH but that's different.
as for landing/uploading new CLs with respect to the error CQ posted above: When you create a branch F in your CL in your own fork, make sure it's upstream is origin/master, whatever origin is. Assuming you are familiar with git cl, the following should let you CQ this: git clone https://github.com/luci/luci-go git new-branch feature git cl patch 1807463005 git cl upload -c -t "set correct target ref" # verify that left side of this codereview site shows target-ref "refs/heads/master". # optional - my way of working with github git remote set-url --push origin git@github.com:/mithro/luci-go.git git push origin HEAD:your_new_branch_such_as_patch-1 https://codereview.chromium.org/1807463005/diff/1/README.md File README.md (right): https://codereview.chromium.org/1807463005/diff/1/README.md#newcode12 README.md:12: `$GOROOT` / `$GOPATH` and adding `$GOROOT/bin:$GOPATH/bin` to your `$PATH`. On 2016/03/16 12:50:54, M-A Ruel wrote: > I disagree about recommending to set GOROOT. Normally you should not have to set > it, only GOPATH is needed. The equivalent of GOROOT needs to be added to PATH > but that's different. hm, I couldn't manage to avoid setting GOROOT myself. The only way I found was installing golang as a package, but version was outdated, and provided little way towards experimenting with newer/different go versions.
https://codereview.chromium.org/1807463005/diff/1/README.md File README.md (right): https://codereview.chromium.org/1807463005/diff/1/README.md#newcode12 README.md:12: `$GOROOT` / `$GOPATH` and adding `$GOROOT/bin:$GOPATH/bin` to your `$PATH`. On 2016/03/16 15:57:55, tandrii(chromium) wrote: > On 2016/03/16 12:50:54, M-A Ruel wrote: > > I disagree about recommending to set GOROOT. Normally you should not have to > set > > it, only GOPATH is needed. The equivalent of GOROOT needs to be added to PATH > > but that's different. > > hm, I couldn't manage to avoid setting GOROOT myself. The only way I found was > installing golang as a package, but version was outdated, and provided little > way towards experimenting with newer/different go versions. Ok. I build it myself so I guess I'm an outlier. It's literally less than 5 minutes.
Description was changed from ========== Adding go set up instructions to README.md R=maruel@chromium.org ========== to ========== Adding quicksetup script and instructions to README.md The quick setup script gets everything you need to develop the luci-go code such as go itself and tools like depot_tools, goimports and pcg. R=maruel@chromium.org ==========
The CQ bit was checked by tansell@chromium.org to run a CQ dry run
Description was changed from ========== Adding quicksetup script and instructions to README.md The quick setup script gets everything you need to develop the luci-go code such as go itself and tools like depot_tools, goimports and pcg. R=maruel@chromium.org ========== to ========== Adding quicksetup script and instructions to README.md The quick setup script gets everything you need to develop the luci-go code such as go itself and tools like depot_tools, goimports and pcg. R=maruel@chromium.org ==========
Hi everyone, After working on luci-go the last couple of weeks I'm resurrecting this CL. I originally tried making the setup instructions more detailed (to include more details about things like goimports and pcg) but it quickly became easier to just provide a setup script. The setup script creates a self-contained environment with everything you need in it include go and all the related tools. It also generates a script which can be used to "enter" the environment and sets all the things needed like GOPATH, GOROOT, PATH, etc. It means that new users can get started by just using; wget -O- https://raw.githubusercontent.com/luci/luci-go/master/quicksetup.sh | bash Tim 'mithro' Ansell
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807463005/20001
On 2016/06/14 01:34:57, mithro wrote: > Hi everyone, > > After working on luci-go the last couple of weeks I'm resurrecting this CL. I > originally tried making the setup instructions more detailed (to include more > details about things like goimports and pcg) but it quickly became easier to > just provide a setup script. > > The setup script creates a self-contained environment with everything you need > in it include go and all the related tools. It also generates a script which can > be used to "enter" the environment and sets all the things needed like GOPATH, > GOROOT, PATH, etc. > > It means that new users can get started by just using; > wget -O- https://raw.githubusercontent.com/luci/luci-go/master/quicksetup.sh | > bash > > Tim 'mithro' Ansell This setup also has the advantage on a goobuntu machine that it isolates you from the systems installed go and goimports which makes things confusing if you are not working inside Google3. Tim 'mithro' Ansell
On 2016/06/14 01:37:04, mithro wrote: > On 2016/06/14 01:34:57, mithro wrote: > > Hi everyone, > > > > After working on luci-go the last couple of weeks I'm resurrecting this CL. I > > originally tried making the setup instructions more detailed (to include more > > details about things like goimports and pcg) but it quickly became easier to > > just provide a setup script. > > > > The setup script creates a self-contained environment with everything you need > > in it include go and all the related tools. It also generates a script which > can > > be used to "enter" the environment and sets all the things needed like GOPATH, > > GOROOT, PATH, etc. > > > > It means that new users can get started by just using; > > wget -O- https://raw.githubusercontent.com/luci/luci-go/master/quicksetup.sh > | > > bash > > > > Tim 'mithro' Ansell > > This setup also has the advantage on a goobuntu machine that it isolates you > from the systems installed go and goimports which makes things confusing if you > are not working inside Google3. > > Tim 'mithro' Ansell I'm not convinced this is necessary. If someone coming to luci from go world, (s)he already has a go installation. Otherwise, you are likely from chrome (infra) land, and so should likely use our proper deps managed bootstrap in infra/infra, which is easy to get: # install depot_tools first $ mkdir checkout; cd checkout; fetch infra $ cd infra/go $ eval `./env.py` # hack hack
On 2016/06/14 19:42:57, tandrii(chromium) wrote: > On 2016/06/14 01:37:04, mithro wrote: > > On 2016/06/14 01:34:57, mithro wrote: > > > Hi everyone, > > > > > > After working on luci-go the last couple of weeks I'm resurrecting this CL. > I > > > originally tried making the setup instructions more detailed (to include > more > > > details about things like goimports and pcg) but it quickly became easier to > > > just provide a setup script. > > > > > > The setup script creates a self-contained environment with everything you > need > > > in it include go and all the related tools. It also generates a script which > > can > > > be used to "enter" the environment and sets all the things needed like > GOPATH, > > > GOROOT, PATH, etc. > > > > > > It means that new users can get started by just using; > > > wget -O- > https://raw.githubusercontent.com/luci/luci-go/master/quicksetup.sh > > | > > > bash > > > > > > Tim 'mithro' Ansell > > > > This setup also has the advantage on a goobuntu machine that it isolates you > > from the systems installed go and goimports which makes things confusing if > you > > are not working inside Google3. > > > > Tim 'mithro' Ansell > > I'm not convinced this is necessary. If someone coming to luci from go world, > (s)he already has a go installation. > Otherwise, you are likely from chrome (infra) land, and so should likely use our > proper deps managed bootstrap in infra/infra, which is easy to get: > > # install depot_tools first > $ mkdir checkout; cd checkout; fetch infra > $ cd infra/go > $ eval `./env.py` > # hack hack and FTR, this setup have the same advantages as you listed + * is continuously tested on our bots * ensure that deps are in their right tested versions but * is substantially heavier :(
+1 to what Andrii said If you are a gopher, you presumably have the SDK already. If you are not a gopher and work in Chromium, there's https://chromium.googlesource.com/infra/infra/+/master/go/README.md that is cross platform (works on Windows) and continuously tested by bots. --- I don't like this CL, the script will rot.
On 2016/06/14 20:57:21, Vadim Sh. wrote: > +1 to what Andrii said > > If you are a gopher, you presumably have the SDK already. > > If you are not a gopher and work in Chromium, there's > https://chromium.googlesource.com/infra/infra/+/master/go/README.md that is > cross platform (works on Windows) and continuously tested by bots. > > --- > > I don't like this CL, the script will rot. (Though I don't terribly mind if it lands. The final verdict is on M-A).
None of the "infra method" is documented in the repo README, so I had no idea that stuff even existed. It sounds almost like what I want. I'll look at changing the quick setup script to use the "infra method" and see how it goes. I had been struggling with the "just use the go you had" method due to confusion between the go shipping on Goobuntu compared to external version. Which is where this script came from. Go is still a minority language, so luci-go is likely to be many people's first introduction to the language. From what I can see, luci-go (and related projects) are also the *only* Go projects to use depot_tools/rietveld/chrome infra setup, which makes you even more unique. Hence you need to be clearer about setup instructions. On 15 Jun 2016 5:42 AM, <tandrii@chromium.org> wrote: > On 2016/06/14 01:37:04, mithro wrote: > > On 2016/06/14 01:34:57, mithro wrote: > > > Hi everyone, > > > > > > After working on luci-go the last couple of weeks I'm resurrecting > this CL. > I > > > originally tried making the setup instructions more detailed (to > include > more > > > details about things like goimports and pcg) but it quickly became > easier to > > > just provide a setup script. > > > > > > The setup script creates a self-contained environment with everything > you > need > > > in it include go and all the related tools. It also generates a script > which > > can > > > be used to "enter" the environment and sets all the things needed like > GOPATH, > > > GOROOT, PATH, etc. > > > > > > It means that new users can get started by just using; > > > wget -O- > https://raw.githubusercontent.com/luci/luci-go/master/quicksetup.sh > > | > > > bash > > > > > > Tim 'mithro' Ansell > > > > This setup also has the advantage on a goobuntu machine that it isolates > you > > from the systems installed go and goimports which makes things confusing > if > you > > are not working inside Google3. > > > > Tim 'mithro' Ansell > > I'm not convinced this is necessary. If someone coming to luci from go > world, > (s)he already has a go installation. > Otherwise, you are likely from chrome (infra) land, and so should likely > use our > proper deps managed bootstrap in infra/infra, which is easy to get: > > # install depot_tools first > $ mkdir checkout; cd checkout; fetch infra > $ cd infra/go > $ eval `./env.py` > # hack hack > > > https://codereview.chromium.org/1807463005/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Hi everyone, I've updated the README and quicksetup script to use the "Chromium Infra Go Area" stuff. I wonder if the quicksetup script should end up in the infra/go repo somewhere instead? PTAL. Tim 'mithro' Ansell
On 2016/06/16 04:46:00, mithro wrote: > Hi everyone, > > I've updated the README and quicksetup script to use the "Chromium Infra Go > Area" stuff. > > I wonder if the quicksetup script should end up in the infra/go repo somewhere > instead? IMO, it should: infra/go/src/github.com/luci/luci-go
personally, I dislike running bash scripts from the internet. but I 100% agree it removes lots of needless friction on getting started. In Gerrit jargon, Code-Review +1 (somebody else must approve). https://codereview.chromium.org/1807463005/diff/100001/README.md File README.md (right): https://codereview.chromium.org/1807463005/diff/100001/README.md#newcode19 README.md:19: environment like this; s/;/: https://codereview.chromium.org/1807463005/diff/100001/README.md#newcode21 README.md:21: wget -O- https://raw.githubusercontent.com/luci/luci-go/master/quicksetup-infra-go-are... | bash i'd add first line: cd /where/you/want/source/code https://codereview.chromium.org/1807463005/diff/100001/quicksetup-infra-go-ar... File quicksetup-infra-go-area.sh (right): https://codereview.chromium.org/1807463005/diff/100001/quicksetup-infra-go-ar... quicksetup-infra-go-area.sh:2: # Copyright 2015 The LUCI Authors. All rights reserved. nit2016
I've create https://codereview.chromium.org/2071243002/ which puts the quicksetup script in the infra repository. This CL now just updates the README to point to that.
https://codereview.chromium.org/1807463005/diff/100001/README.md File README.md (right): https://codereview.chromium.org/1807463005/diff/100001/README.md#newcode19 README.md:19: environment like this; On 2016/06/16 18:30:45, tandrii(chromium) wrote: > s/;/: Done here and above. https://codereview.chromium.org/1807463005/diff/100001/README.md#newcode21 README.md:21: wget -O- https://raw.githubusercontent.com/luci/luci-go/master/quicksetup-infra-go-are... | bash On 2016/06/16 18:30:45, tandrii(chromium) wrote: > i'd add first line: > cd /where/you/want/source/code Done. https://codereview.chromium.org/1807463005/diff/100001/quicksetup-infra-go-ar... File quicksetup-infra-go-area.sh (right): https://codereview.chromium.org/1807463005/diff/100001/quicksetup-infra-go-ar... quicksetup-infra-go-area.sh:2: # Copyright 2015 The LUCI Authors. All rights reserved. On 2016/06/16 18:30:45, tandrii(chromium) wrote: > nit2016 Done.
Description was changed from ========== Adding quicksetup script and instructions to README.md The quick setup script gets everything you need to develop the luci-go code such as go itself and tools like depot_tools, goimports and pcg. R=maruel@chromium.org ========== to ========== luci-go: Improving setup instructions in README.md Point to the "Chrome Infra Go Area" and the quicksetup script. R=maruel@chromium.org ==========
nodir@google.com changed reviewers: + nodir@google.com
FTR the commit https://chromium.googlesource.com/infra/infra/+/e8441f571e7a2198e7837bb03b147... that points to this CL is actually a result of https://codereview.chromium.org/2071243002/ |
