<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/make.bat, branch dev.go2go</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>make.bat: fix compare between GOROOT and srcdir paths, when either contains whitespace.</title>
<updated>2020-09-13T19:17:09+00:00</updated>
<author>
<name>Dominic Della Valle</name>
<email>ddvpublic@Gmail.com</email>
</author>
<published>2020-09-13T17:03:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=66e66e71132034aa620ffbae9008f951da0f9f27'/>
<id>66e66e71132034aa620ffbae9008f951da0f9f27</id>
<content type='text'>
CL 96455 brings CL 57753 to Windows
However, a path comparison within it was left unquoted.
If the Go source directory resides in a path containing whitespace,
the interpreter will compare against the first portion of the path string,
and treat the remainder as an expression.
This patch amends that.

For example, consider the path
`C:\Users\Dominic Della Valle\Projects\Go\goroot\src`
Issuing `make.bat` will print out `'Della' is not recognized as an internal or external command, operable program or batch file.` before proceeding.

Change-Id: Ifcec159baeec940c29c61aa721c64c13c6fd8c14
GitHub-Last-Rev: 809ddbb4dbc80d834f8108ca44c2826016d78d1c
GitHub-Pull-Request: golang/go#41319
Reviewed-on: https://go-review.googlesource.com/c/go/+/253898
Run-TryBot: Giovanni Bajo &lt;rasky@develer.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Giovanni Bajo &lt;rasky@develer.com&gt;
Trust: Giovanni Bajo &lt;rasky@develer.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CL 96455 brings CL 57753 to Windows
However, a path comparison within it was left unquoted.
If the Go source directory resides in a path containing whitespace,
the interpreter will compare against the first portion of the path string,
and treat the remainder as an expression.
This patch amends that.

For example, consider the path
`C:\Users\Dominic Della Valle\Projects\Go\goroot\src`
Issuing `make.bat` will print out `'Della' is not recognized as an internal or external command, operable program or batch file.` before proceeding.

Change-Id: Ifcec159baeec940c29c61aa721c64c13c6fd8c14
GitHub-Last-Rev: 809ddbb4dbc80d834f8108ca44c2826016d78d1c
GitHub-Pull-Request: golang/go#41319
Reviewed-on: https://go-review.googlesource.com/c/go/+/253898
Run-TryBot: Giovanni Bajo &lt;rasky@develer.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Giovanni Bajo &lt;rasky@develer.com&gt;
Trust: Giovanni Bajo &lt;rasky@develer.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: treat all files as binary, but check in .bat with CRLF</title>
<updated>2020-06-08T15:31:43+00:00</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>dmitshur@golang.org</email>
</author>
<published>2020-06-04T04:35:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=ee379d2b08ce12c24042da18d711e2a1bd7943f0'/>
<id>ee379d2b08ce12c24042da18d711e2a1bd7943f0</id>
<content type='text'>
This is a followup to CL 96495.

It should be simpler and more robust to achieve .bat files having
CRLF line endings by treating it as a binary file, like all other
files, and checking it in with the desired CRLF line endings.

A test is used to check the entire Go tree, short of directories
starting with "." and named "testdata", for any .bat files that
have anything other than strict CRLF line endings. This will help
catch any accidental modifications to existing .bat files or check
ins of new .bat files.

Importantly, this is compatible with how Gerrit serves .tar.gz files,
making it so that CRLF line endings are preserved.

The Go project is supported on many different environments, some of
which may have limited git implementations available, or none at all.
Relying on fewer git features and special rules makes it easier to
have confidence in the exact content of all files. Additionally, Go
development started in Subversion, moved to Perforce, then Mercurial,
and now uses Git.¹ Reducing its reliance on git-specific features will
help if there will be another transition in the project's future.

There are only 5 .bat files in the entire Go source tree, so a new one
being added is a rare event, and we prefer to do things in Go instead.
We still have the option of improving the experience for developers by
adding a pre-commit converter for .bat files to the git-codereview tool.

¹ https://groups.google.com/d/msg/golang-dev/sckirqOWepg/YmyT7dWJiocJ

Fixes #39391.
For #37791.

Change-Id: I6e202216322872f0307ac96f1b8d3f57cb901e6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/236437
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to CL 96495.

It should be simpler and more robust to achieve .bat files having
CRLF line endings by treating it as a binary file, like all other
files, and checking it in with the desired CRLF line endings.

A test is used to check the entire Go tree, short of directories
starting with "." and named "testdata", for any .bat files that
have anything other than strict CRLF line endings. This will help
catch any accidental modifications to existing .bat files or check
ins of new .bat files.

Importantly, this is compatible with how Gerrit serves .tar.gz files,
making it so that CRLF line endings are preserved.

The Go project is supported on many different environments, some of
which may have limited git implementations available, or none at all.
Relying on fewer git features and special rules makes it easier to
have confidence in the exact content of all files. Additionally, Go
development started in Subversion, moved to Perforce, then Mercurial,
and now uses Git.¹ Reducing its reliance on git-specific features will
help if there will be another transition in the project's future.

There are only 5 .bat files in the entire Go source tree, so a new one
being added is a rare event, and we prefer to do things in Go instead.
We still have the option of improving the experience for developers by
adding a pre-commit converter for .bat files to the git-codereview tool.

¹ https://groups.google.com/d/msg/golang-dev/sckirqOWepg/YmyT7dWJiocJ

Fixes #39391.
For #37791.

Change-Id: I6e202216322872f0307ac96f1b8d3f57cb901e6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/236437
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: add default GOROOT_BOOTSTRAP in Windows</title>
<updated>2020-03-22T08:44:07+00:00</updated>
<author>
<name>Giovanni Bajo</name>
<email>rasky@develer.com</email>
</author>
<published>2018-02-25T10:32:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=683c266f958db9acff705856f2c0aeb031d9782c'/>
<id>683c266f958db9acff705856f2c0aeb031d9782c</id>
<content type='text'>
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 &lt;alex.brainman@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;alex.brainman@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: force all Windows batch files to CRLF</title>
<updated>2020-03-22T08:42:38+00:00</updated>
<author>
<name>Giovanni Bajo</name>
<email>rasky@develer.com</email>
</author>
<published>2020-03-22T08:28:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=787e7b048cff392d1cb68c57c99ff71602997475'/>
<id>787e7b048cff392d1cb68c57c99ff71602997475</id>
<content type='text'>
Batch files should use CRLF endings. LF endings mostly
work but in some situations they cause random errors like
goto commands failing for mysterious reasons. See
golang.org/issue/37791 for more information.

Next CL triggered one of such bug (a label was not being
recognized), so prepare for it by converting to CRLF.

This CL also touches all existing batch files to force git
to update the line endings (unfortunately, changing
.gitattributes only has effect next time the file is checked
out or modified).

Fixes #37791
Updates #9281

Change-Id: I6f9a114351cb7ac9881914400aa210c930eb8cc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/96495
Run-TryBot: Giovanni Bajo &lt;rasky@develer.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Batch files should use CRLF endings. LF endings mostly
work but in some situations they cause random errors like
goto commands failing for mysterious reasons. See
golang.org/issue/37791 for more information.

Next CL triggered one of such bug (a label was not being
recognized), so prepare for it by converting to CRLF.

This CL also touches all existing batch files to force git
to update the line endings (unfortunately, changing
.gitattributes only has effect next time the file is checked
out or modified).

Fixes #37791
Updates #9281

Change-Id: I6f9a114351cb7ac9881914400aa210c930eb8cc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/96495
Run-TryBot: Giovanni Bajo &lt;rasky@develer.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: add env -w and env -u to set and unset default env vars</title>
<updated>2019-04-23T00:58:08+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2019-04-08T15:23:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=f0e97546962736fe4aa73b7c7ed590f0134515e1'/>
<id>f0e97546962736fe4aa73b7c7ed590f0134515e1</id>
<content type='text'>
Setting environment variables for go command configuration
is too difficult and system-specific. This CL adds go env -w,
to change the default settings more easily, in a portable way.
It also adds go env -u, to unset those changes.

See https://golang.org/design/30411-env for details.

Fixes #30411.

Change-Id: I36e83f55b666459f8f7f482432a4a6ee015da71d
Reviewed-on: https://go-review.googlesource.com/c/go/+/171137
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting environment variables for go command configuration
is too difficult and system-specific. This CL adds go env -w,
to change the default settings more easily, in a portable way.
It also adds go env -u, to unset those changes.

See https://golang.org/design/30411-env for details.

Fixes #30411.

Change-Id: I36e83f55b666459f8f7f482432a4a6ee015da71d
Reviewed-on: https://go-review.googlesource.com/c/go/+/171137
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd,std: add go.mod files</title>
<updated>2019-03-11T20:27:41+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2019-02-20T23:25:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=0fc89a72edc2c73651f7f6841b1146af723f517f'/>
<id>0fc89a72edc2c73651f7f6841b1146af723f517f</id>
<content type='text'>
Updates #30241
Updates #30228

Change-Id: Ida0fe8263bf44e0498fed2048e22283ba5716835
Reviewed-on: https://go-review.googlesource.com/c/go/+/164622
Run-TryBot: Bryan C. Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Jay Conrod &lt;jayconrod@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates #30241
Updates #30228

Change-Id: Ida0fe8263bf44e0498fed2048e22283ba5716835
Reviewed-on: https://go-review.googlesource.com/c/go/+/164622
Run-TryBot: Bryan C. Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Jay Conrod &lt;jayconrod@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: clear GO111MODULE during make.bash etc</title>
<updated>2018-11-16T18:54:22+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2018-11-16T17:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=2a07c50a5cbf548a313eed6e691be78a0bac8b3e'/>
<id>2a07c50a5cbf548a313eed6e691be78a0bac8b3e</id>
<content type='text'>
The standard build assumes the variable is unset.
Make it so, like we do for GOFLAGS, GOBIN, and so on.

Change-Id: I4ad5695f8021b08bd1a35dd99112970a813d247c
Reviewed-on: https://go-review.googlesource.com/c/149959
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard build assumes the variable is unset.
Make it so, like we do for GOFLAGS, GOBIN, and so on.

Change-Id: I4ad5695f8021b08bd1a35dd99112970a813d247c
Reviewed-on: https://go-review.googlesource.com/c/149959
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src/make.bat: add missing go.exe extension</title>
<updated>2018-08-25T22:42:46+00:00</updated>
<author>
<name>Goo</name>
<email>liuwanle2010@gmail.com</email>
</author>
<published>2018-08-25T22:35:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=30b080e0600e774516a4f9343d7c5f53a5d012c2'/>
<id>30b080e0600e774516a4f9343d7c5f53a5d012c2</id>
<content type='text'>
Got error:
'go' is not an internal or external command, nor is it a runnable program

Change-Id: Ie45a3a12252fa01b67ca09ef8fbb5b4bbf728fe7
GitHub-Last-Rev: 451815cacd9bfc509fa0aab3be54303797e605a2
GitHub-Pull-Request: golang/go#27214
Reviewed-on: https://go-review.googlesource.com/131397
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Got error:
'go' is not an internal or external command, nor is it a runnable program

Change-Id: Ie45a3a12252fa01b67ca09ef8fbb5b4bbf728fe7
GitHub-Last-Rev: 451815cacd9bfc509fa0aab3be54303797e605a2
GitHub-Pull-Request: golang/go#27214
Reviewed-on: https://go-review.googlesource.com/131397
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/dist: fix compilation on windows</title>
<updated>2018-08-25T22:39:17+00:00</updated>
<author>
<name>Florin Pățan</name>
<email>florinpatan@gmail.com</email>
</author>
<published>2018-07-19T12:05:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d145d923f894f3ef2faae52ca05321ef3d5bee7e'/>
<id>d145d923f894f3ef2faae52ca05321ef3d5bee7e</id>
<content type='text'>
Add missing extensions to binary files in order to allow execution.

Change-Id: Idfe4c72c80c26b7b938023bc7bbe1ef85e1aa7b0

Change-Id: Idfe4c72c80c26b7b938023bc7bbe1ef85e1aa7b0
GitHub-Last-Rev: ed9d8124270c30b7f25f89656432ef5089466c7e
GitHub-Pull-Request: golang/go#26464
Reviewed-on: https://go-review.googlesource.com/124936
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing extensions to binary files in order to allow execution.

Change-Id: Idfe4c72c80c26b7b938023bc7bbe1ef85e1aa7b0

Change-Id: Idfe4c72c80c26b7b938023bc7bbe1ef85e1aa7b0
GitHub-Last-Rev: ed9d8124270c30b7f25f89656432ef5089466c7e
GitHub-Pull-Request: golang/go#26464
Reviewed-on: https://go-review.googlesource.com/124936
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: add $GOFLAGS environment variable</title>
<updated>2018-08-01T00:35:21+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2018-07-29T05:10:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=c1a4fc3b36ccfe0022392224c2630f7971c156fe'/>
<id>c1a4fc3b36ccfe0022392224c2630f7971c156fe</id>
<content type='text'>
People sometimes want to turn on a particular go command flag by default.
In Go 1.11 we have at least two different cases where users may need this.

1. Linking can be noticeably slower on underpowered systems
due to DWARF, and users may want to set -ldflags=-w by default.

2. For modules, some users or CI systems will want vendoring always,
so they want -getmode=vendor (soon to be -mod=vendor) by default.

This CL generalizes the problem to “set default flags for the go command.”

$GOFLAGS can be a space-separated list of flag settings, but each
space-separated entry in the list must be a standalone flag.
That is, you must do 'GOFLAGS=-ldflags=-w' not 'GOFLAGS=-ldflags -w'.
The latter would mean to pass -w to go commands that understand it
(if any do; if not, it's an error to mention it).

For #26074.
For #26318.
Fixes #26585.

Change-Id: I428f79c1fbfb9e41e54d199c68746405aed2319c
Reviewed-on: https://go-review.googlesource.com/126656
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
People sometimes want to turn on a particular go command flag by default.
In Go 1.11 we have at least two different cases where users may need this.

1. Linking can be noticeably slower on underpowered systems
due to DWARF, and users may want to set -ldflags=-w by default.

2. For modules, some users or CI systems will want vendoring always,
so they want -getmode=vendor (soon to be -mod=vendor) by default.

This CL generalizes the problem to “set default flags for the go command.”

$GOFLAGS can be a space-separated list of flag settings, but each
space-separated entry in the list must be a standalone flag.
That is, you must do 'GOFLAGS=-ldflags=-w' not 'GOFLAGS=-ldflags -w'.
The latter would mean to pass -w to go commands that understand it
(if any do; if not, it's an error to mention it).

For #26074.
For #26318.
Fixes #26585.

Change-Id: I428f79c1fbfb9e41e54d199c68746405aed2319c
Reviewed-on: https://go-review.googlesource.com/126656
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
