From 46280d8aebd657269edde5b1553df28bb91068a3 Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Sat, 16 Aug 2025 14:41:00 +0800 Subject: [PATCH 1/2] cmd/compile: tweak example command in README While running ./src/all.bash, I got the following error: all.bash must be run from $GOROOT/src Change-Id: I42e1999db28167f8f738dcb0eae25d0b8bee3daf --- src/cmd/compile/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/README.md b/src/cmd/compile/README.md index cffb4e7a80fa93..dc49a011cb443f 100644 --- a/src/cmd/compile/README.md +++ b/src/cmd/compile/README.md @@ -283,9 +283,9 @@ dependencies, so is not suitable for distributed build systems.) $ git clone https://go.googlesource.com/go $ cd go $ git checkout -b mybranch - $ ./src/all.bash # build and confirm good starting point + $ cd src && ./all.bash && cd .. # build and confirm good starting point $ export PATH=$PWD/bin:$PATH - $ toolstash save # save current tools + $ toolstash save # save current tools ``` After that, your edit/compile/test cycle can be similar to: ``` From 2e289babf1bc81c1a44c9a72a29659d8bf9d827b Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Tue, 19 Aug 2025 23:35:11 +0800 Subject: [PATCH 2/2] 1 Change-Id: I7f55ab1d33e8d014ec6034a051cc64ba53d75ae8 --- src/cmd/compile/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/compile/README.md b/src/cmd/compile/README.md index dc49a011cb443f..79d233615427c3 100644 --- a/src/cmd/compile/README.md +++ b/src/cmd/compile/README.md @@ -281,10 +281,10 @@ dependencies, so is not suitable for distributed build systems.) ``` $ go install golang.org/x/tools/cmd/toolstash@latest $ git clone https://go.googlesource.com/go - $ cd go + $ export PATH=$PWD/go/bin:$PATH + $ cd go/src $ git checkout -b mybranch - $ cd src && ./all.bash && cd .. # build and confirm good starting point - $ export PATH=$PWD/bin:$PATH + $ ./all.bash # build and confirm good starting point $ toolstash save # save current tools ``` After that, your edit/compile/test cycle can be similar to: