weekly.2012-03-13 (Go 1 RC1)

13,337 views
Skip to first unread message

Andrew Gerrand

unread,
Mar 13, 2012, 9:46:36 PM3/13/12
to golang-nuts
We've just tagged a new Go weekly, weekly.2012-03-13.

This weekly snapshot is very close to what we expect will be the contents of
the Go 1 release. There are still a few minor documentation issues to resolve,
and a handful of bugs that should be addressed before the release, but the vast
majority of Go programs should be completely unaffected by any changes we make
between now and the full release.

If you're interested in helping us test, eager to try out Go 1, or just
curious, this weekly snapshot is the one to try. We'll issue a new App Engine
Go 1 beta SDK very soon, so if you're an App Engine user you can try it there
too.

To help us focus on any remaining bugs and avoid introducing new ones, we will
restrict our attention to critical fixes and issues marked Go1-Must in the
issue tracker. Everything non-essential will be held until after the Go 1
release is cut and in the field for a while.

Documentation for this snapshot is available here:
http://weekly.golang.org/

As usual, you can update by running:
hg pull
hg update weekly

Or you may wish to install a pre-compiled binary release by following
the installation instructions here:
http://weekly.golang.org/doc/install

The files are available here:
http://code.google.com/p/go/downloads/list?sort=summary

We want to make sure that new users have the best experience possible,
so please let us know if you have any issues with installation, the
documentation, or using the tools after installation.

Please leave feedback (both positive and negative) in the issue
tracker entry relevant to your operating system and architecture:

http://golang.org/issue/3210 darwin-386
http://golang.org/issue/3208 darwin-amd64
http://golang.org/issue/3212 freebsd-386
http://golang.org/issue/3213 freebsd-amd64
http://golang.org/issue/3209 linux-386
http://golang.org/issue/3211 linux-amd64
http://golang.org/issue/3214 windows-386
http://golang.org/issue/3215 windows-amd64

Make sure you tell us the version of the operating system you use.

Changes in this snapshot:
* archive/zip: verify CRC32s in non-streamed files,
write data descriptor signature for OS X; fix bugs reading it.
* build: build correct cmd/dist matching GOHOSTARCH (thanks Shenghou Ma),
re-enable some broken tests in run.bash (thanks Shenghou Ma),
remove some references to Make.inc etc.
use run.go for running tests.
* builder: use short test for subrepos (thanks Shenghou Ma).
* cgo, runtime: diagnose callback on non-Go thread.
* cmd/api: set compiler for all build contexts,
work on Windows again, and make gccgo files work a bit more.
* cmd/cgo: document CGO_LDFLAGS and CGO_CFLAGS,
silence const warnings.
* cmd/dist, cmd/go: move CGO_ENABLED from 'go tool dist env' to 'go
env' (thanks Shenghou Ma).
* cmd/dist: fix build for Linux/ARM (thanks Shenghou Ma),
use correct hg tag for go version (thanks Alex Brainman).
* cmd/fix: add rules for net/http -> net/http/httputil renames.
* cmd/gc: allow ~ in import paths,
delete old map delete in walk,
do not confuse unexported methods of same name,
if $GOROOT_FINAL is set, rewrite file names in object files,
implement len(array) / cap(array) rule,
import path cannot start with slash on Windows (thanks Shenghou Ma),
must not inline panic, recover,
show duplicate key in error,
unnamed struct types can have methods.
* cmd/go: add -compiler,
add env command, use to fix misc/cgo/testso,
allow go get with arbitrary URLs,
allow ssh tunnelled bzr, git and svn (thanks Ingo Oeser),
always provide .exe suffix on windows (thanks Shenghou Ma),
document import path meta tag discovery in go help remote,
honor buildflags in run, test (thanks Rémy Oudompheng),
local import fixes,
make go get new.code/... work,
rebuild external test package dependencies,
respect $GOBIN always,
support -compiler for go list, fix isStale for gccgo (thanks Rémy Oudompheng).
* cmd/godoc: add support for serving templates.
fix codewalk handler (thanks Francisco Souza).
remove extra / in paths (thanks Ugorji Nwoke),
support $GOPATH, simplify file system code,
switch on +1 buttons.
* cmd/gofmt: fix race in long test (thanks Mikio Hara).
* codereview: fix for Mercurial 2.1.
* crypto/x509: allow server gated crypto in windows systemVerify
(thanks Mikkel Krautz),
do not forget to free cert context (thanks Alex Brainman),
don't include empty additional primes in PKCS#1 private key,
enforce path length constraint,
new home for root fetchers; build chains using Windows API (thanks
Mikkel Krautz).
* csv: clarify what a negative FieldsPerRecord means.
* database/sql: add docs about connection state, pooling,
ensure Stmts are correctly closed (thanks Gwenael Treguier),
fix double connection free on Stmt.Query error,
fix typo bug resulting in double-Prepare.
* database/sql: add ErrBadConn.
* doc/go1: template packages have changed since r60.
* doc/go_mem: init-created goroutine behavior changes for Go 1 (thanks
Shenghou Ma).
* doc/gopher: flip frontpage gopher's eyes.
* doc: add "About the go command" article,
add C? Go? Cgo! article (thanks Francisco Souza),
add Go's declaration syntax article (thanks Francisco Souza),
add more gophers,
add note about import . to Go 1 compatibility notes,
several doc fixes and improvements,
update Effective Go init section,
update progs/run (thanks Shenghou Ma),
update reference gopher,
web site tweaks.
* encoding/asn1: handle UTCTime before the year 2000.
* encoding/binary: improve package comment (thanks Stefan Nilsson).
* encoding/gob: fix memory corruption.
* encoding/json: document that nil slice encodes as `null`.
* exp/wingui: moved to code.google.com/p/gowingui.
* expvar: add locking to String, and use RWMutex properly throughout,
add missing locking in String methods.
* fmt, log: stop using unicode.
* fmt: minor tweak of package doc to show headings in godoc (thanks
Volker Dobler).
* go/build, cmd/go: add support for .syso files.
* go/build: add NoGoError,
add dependency test,
do not parse .syso files (thanks Alex Brainman).
* go/parser: avoid endless loop in case of internal error,
better error synchronization.
* go/printer, gofmt: nicer formatting of multi-line returns.
* go/printer: example for Fprint.
* go/scanner: better panic diagnostic.
* go spec: no known implementation differences anymore,
fix inaccuracy in type identity definition.
* io: better document WriterAt.
* misc/dashboard: remove obsolete package builder code.
* misc/dist: add source archive support,
add windows installer and zip support,
minimum target requirement is 10.6 for Darwin (thanks Shenghou Ma).
* misc/emacs: fix extra indentation after comments that end with a period.
* misc/xcode: example install of language spec for Xcode 4.x (thanks
Emil Hessman).
* net, net/rpc, reflect, time: document concurrency guarantees.
* net/http: fix crash with Transport.CloseIdleConnections,
return appropriate errors from ReadRequest.
* net: add skip message to test (thanks Mikio Hara),
disable use of external listen along with other external network uses,
do not use reflect for DNS messages (thanks Rémy Oudompheng),
document ReadMsgUnix, WriteMsgUnix,
fix TestDialTimeout on windows builder,
improve server and file tests (thanks Mikio Hara),
make Dial and Listen behavior consistent across over platforms
(thanks Mikio Hara),
remove dependence on bytes, fmt, strconv,
silence another epoll print,
use IANA reserved port to test dial timeout (thanks Mikio Hara).
* os: document FileInfo.Size as system-dependent for irregular files,
fix SameFile to work for directories on windows (thanks Alex Brainman).
* path/filepath/path_test.go: repair and enable TestAbs.
* path/filepath: disable AbsTest on windows,
retrieve real file name in windows EvalSymlinks (thanks Alex Brainman).
* runtime/pprof: disable test on Leopard 64-bit.
* runtime: add Compiler,
fix windows/amd64 exception handler (thanks Alex Brainman),
inline calls to notok,
move runtime.write back to C,
print error on receipt of signal on non-Go thread,
remove unused runtime·signame and runtime·newError,
try extending arena size in 32-bit allocator (thanks Rémy Oudompheng),
wait for main goroutine before setting GOMAXPROCS (thanks Rémy Oudompheng).
* strconv: add table-based isPrint, remove dependence on bytes,
unicode, and strings.
* sync/atomic: disable store and load test on a single processor
machine (thanks Mikio Hara).
* syscall: fix mkall.sh, mksyscall_linux.pl, and regen for Linux/ARM
(thanks Shenghou Ma).
* test/run: use all available cores on ARM system (thanks Shenghou Ma).
* test: actually run them on windows (thanks Alex Brainman),
add inherited interface test to ddd.go,
enable method expression tests in ddd.go,
invoke go command in run.go,
match gccgo error messages for bug388.go,
skip . files in directory.
* testing: do not print 'no tests' when there are examples.
* time: during short test, do not bother tickers take longer than
expected (thanks Shenghou Ma),
mention receiver in Unix, UnixNano docs.
* unicode/utf16: remove dependence on package unicode.
* unicode/utf8: remove dependence on unicode.
* windows: make background of gopher icon transparent (thanks Volker Dobler).

Apologies if we missed anyone in the list above. We appreciate all your help.

To see a full list of changes between this and the previous weekly,
after updating, run:
hg log -r weekly.2012-03-04:weekly.2012-03-13

Enjoy.

Andrew

Andrew Gerrand

unread,
Mar 13, 2012, 9:47:21 PM3/13/12
to golang-nuts
There are some issues with documentation pages on weekly.golang.org
that we are currently addressing. In the meantime you may see some
formatting glitches.

Andrew

Stefan Nilsson

unread,
Mar 14, 2012, 5:55:29 AM3/14/12
to golan...@googlegroups.com
I notice that the Go1 RC1 archive files contain source and object files for exp and old. Will they be part of the final release?

shada

unread,
Mar 14, 2012, 6:44:12 AM3/14/12
to Stefan Nilsson, golan...@googlegroups.com
投入实际项目已经很久了,运行相当稳定。
GO1只是一个名称罢了。

minux

unread,
Mar 14, 2012, 7:12:56 AM3/14/12
to Stefan Nilsson, golan...@googlegroups.com

On Wed, Mar 14, 2012 at 5:55 PM, Stefan Nilsson <trollerip...@gmail.com> wrote:
I notice that the Go1 RC1 archive files contain source and object files for exp and old. Will they be part of the final release?
They won't be in Go 1 release. But you can always get them from hg repository.

Rémy Oudompheng

unread,
Mar 14, 2012, 7:29:16 AM3/14/12
to minux, Stefan Nilsson, golan...@googlegroups.com
Does that mean people are supposed to:
go get code.google.com/p/go/src/pkg/exp/norm
? It looks a bit ugly.

2012/3/14, minux <minu...@gmail.com>:

David Symonds

unread,
Mar 14, 2012, 7:38:17 AM3/14/12
to Rémy Oudompheng, golang-nuts, minux, Stefan Nilsson

On Mar 14, 2012 10:29 PM, "Rémy Oudompheng" <remyoud...@gmail.com> wrote:

> Does that mean people are supposed to:
> go get code.google.com/p/go/src/pkg/exp/norm
> ? It looks a bit ugly.

No, people aren't supposed to use exp packages. They are still under development.

It's an oversight that exp/ and old/ slipped in to the binary releases.

David Symonds

unread,
Mar 14, 2012, 7:46:18 AM3/14/12
to Rémy Oudompheng, golang-nuts, minux, Stefan Nilsson

Andrew Gerrand

unread,
Mar 14, 2012, 8:30:14 PM3/14/12
to golang-nuts

These issues should now be resolved. If you notice any further issues
please let me know.

Andrew

Sebastian Schlingmann

unread,
Mar 15, 2012, 2:29:09 AM3/15/12
to golang-nuts
http://weekly.golang.org/pkg/ still has one display problems on the
Opera browser.
The package names in the left column seem to have a fixed width so
that the "y" from "winfsnotify" is moved into the next line.

Paul

unread,
Mar 15, 2012, 6:03:03 AM3/15/12
to golang-nuts
Cool. Is there any news on the status of gccgo?

Ian Lance Taylor

unread,
Mar 15, 2012, 1:15:47 PM3/15/12
to Paul, golang-nuts
Paul <2pau...@googlemail.com> writes:

> Cool. Is there any news on the status of gccgo?

The version of gccgo in the gcc 4.7.0 release will be close to Go 1, but
not quite at it. It includes the weekly.2012-03-04 release. The gcc
4.7.1 release should be Go 1, though that release won't be for a few
months.

Ian

David Anderson

unread,
Mar 15, 2012, 5:35:36 PM3/15/12
to Andrew Gerrand, golang-nuts
This version of Go does not work on a subset of Linux kernels. Right off the bat I'd like to say that I don't think this should hold up Go 1.0 . I would like to see a fix in Go 1.0.1 or Go 1.1.0, and I have a patch to offer. But for the initial release, it's most definitely inconsequential.

Linux kernels with the grsecurity.net hardening patch enforce write-xor-execute on memory pages. Specifically, mmap() and mprotect() calls that attempt to make pages write+execute will fail unless the binary is marked as needing the W^X defense disabled. This of course makes the runtime crash on startup, as it is dependent on W+X.

It's still possible to run Go binaries compiled on a different machine, by using the `paxctl` tool to tag the binary as needing W+X memory. However, unless the Go toolchain can produce binaries tagged in this way by itself, the vanilla source tarball cannot be built/used on machines with this kernel patch.

I have a patch for Go's linkers that adds the appropriate ELF program header to Go binaries. The header maps no additional memory into the runtime, it's used only for its flags (similar to PT_GNU_STACK). The patch is around 5 lines (times five to put it in [568]l). Once Go 1.0 gets out there, I'll send a code review with the change needed to get the toolchain working on grsec machines. Obviously I'll leave it to you folks to decide whether it's worth supporting or not, as grsecurity users are a minority, and a workaround exists for deploying on such machines, even if you can't compile on them directly.

Thanks for what's shaping up to be a great Go 1.0!
- Dave

Graham Anderson

unread,
Mar 15, 2012, 8:08:07 PM3/15/12
to golan...@googlegroups.com, David Anderson
On Thursday 15 Mar 2012 14:35:36 David Anderson wrote:
> I have a patch for Go's linkers that adds the appropriate ELF program
> header to Go binaries. The header maps no additional memory into the
> runtime, it's used only for its flags (similar to PT_GNU_STACK). The patch
> is around 5 lines (times five to put it in [568]l). Once Go 1.0 gets out
> there, I'll send a code review with the change needed to get the toolchain
> working on grsec machines. Obviously I'll leave it to you folks to decide
> whether it's worth supporting or not, as grsecurity users are a minority,
> and a workaround exists for deploying on such machines, even if you can't
> compile on them directly.

There are many specialised kernels, I would hate to see a growing list of
workarounds for each and every one. Such a small patch to Go should probably
be maintained by the specific kernel patchset developers outside of the Go
tree.

David Symonds

unread,
Mar 15, 2012, 9:59:40 PM3/15/12
to Graham Anderson, golan...@googlegroups.com, David Anderson

If it's not intrusive or burdensome, I think we'd prefer to keep it in
the Go tree, as we can update it there when various runtime changes
get made. That's better for the Go developers as well as for the
people wanting to use it on these oddball kernels.

Either way, I'm pretty sure this can wait until after Go 1.


Dave.

si guy

unread,
Mar 15, 2012, 10:03:39 PM3/15/12
to golan...@googlegroups.com

Not this weekly but...

Switched to using the new os/signal today, wow, what a difference, so much easier to use now. Thanks!

Joubin Houshyar

unread,
Mar 21, 2012, 6:38:07 PM3/21/12
to golang-nuts


On Mar 13, 9:46 pm, Andrew Gerrand <a...@golang.org> wrote:
> We've just tagged a new Go weekly, weekly.2012-03-13.
>
> This weekly snapshot is very close to what we expect will be the contents of
> the Go1release. There are still a few minor documentation issues to resolve,
> and a handful of bugs that should be addressed before the release, but the vast
> majority of Go programs should be completely unaffected by any changes we make
> between now and the full release.
>
> If you're interested in helping us test, eager to try out Go1, or just
> curious, this weekly snapshot is the one to try. We'll issue a new App Engine
> Go1beta SDK very soon, so if you're an App Engine user you can try it there
> too.
>
> To help us focus on any remaining bugs and avoid introducing new ones, we will
> restrict our attention to critical fixes and issues marked Go1-Must in the
> issue tracker. Everything non-essential will be held until after the Go1
> release is cut and in the field for a while.
>
> Documentation for this snapshot is available here:
>  http://weekly.golang.org/
>
> As usual, you can update by running:
>  hg pull
>  hg update weekly
>
> Or you may wish to install a pre-compiled binary release by following
> the installation instructions here:
>  http://weekly.golang.org/doc/install
>
> The files are available here:
>  http://code.google.com/p/go/downloads/list?sort=summary
>
> We want to make sure that new users have the best experience possible,
> so please let us know if you have any issues with installation, the
> documentation, or using the tools after installation.
>
> Please leave feedback (both positive and negative) in the issue
> tracker entry relevant to your operating system and architecture:
>
> Make sure you tell us the version of the operating system you use.

I tried updating to this release today (from weekly-2012-01-27) and it
appears Go is having net issues on OS X 10.6.3. (Have left the details
in issue report per above.)

I only use hg for Go and wonder how I can recover and get back to
weekly-2012-01-27 as I don't have a fully functional go install at
this point. Thanks!

>
> Changes in this snapshot:
> * archive/zip: verify CRC32s in non-streamed files,
>         write data descriptor signature forOSX; fix bugs reading it.
>         don't include empty additional primes in PKCS#1private key,
>         enforce path length constraint,
>         new home for root fetchers; build chains using Windows API (thanks
> Mikkel Krautz).
> * csv: clarify what a negative FieldsPerRecord means.
> * database/sql: add docs about connection state, pooling,
>         ensure Stmts are correctly closed (thanks Gwenael Treguier),
>         fix double connection free on Stmt.Query error,
>         fix typo bug resulting in double-Prepare.
> * database/sql: add ErrBadConn.
> * doc/go1: template packages have changed since r60.
> * doc/go_mem: init-created goroutine behavior changes for Go1(thanks
> Shenghou Ma).
> * doc/gopher: flip frontpage gopher's eyes.
> * doc: add "About the go command" article,
>         add C? Go? Cgo! article (thanks Francisco Souza),
>         add Go's declaration syntax article (thanks Francisco Souza),
>         add more gophers,
>         add note about import . to Go1compatibility notes,
> *os: document FileInfo.Size as system-dependent for irregular files,

Andrew Gerrand

unread,
Mar 21, 2012, 7:47:23 PM3/21/12
to Joubin Houshyar, golang-nuts

You can roll back to a previous version with:

hg update tag

where tag is the tag you want to sync to. In this case I suggest you
try the previous weekly:

hg update weekly.2012-03-04

You may also want to check 'hg status' to see if there are any
unwanted dreg files around.

To be really sure you have a clean install you could rm the whole go
tree and clone it again:

hg clone https://code.google.com/p/go
cd go/src
hg update weekly
./all.bash

Andrew

Joubin Houshyar

unread,
Mar 21, 2012, 8:54:24 PM3/21/12
to golang-nuts
Thank you, Andrew. I'll try that.

On Mar 21, 7:47 pm, Andrew Gerrand <a...@golang.org> wrote:
> >>http://golang.org/issue/3210darwin-386http://golang.org/issue/3208dar...
>
> >> Make sure you tell us the version of the operating system you use.
>
> > I tried updating to this release today (from weekly-2012-01-27) and it
> > appears Go is having net issues on OS X 10.6.3. (Have left the details
> > in issue report per above.)
>
> > I only use hg for Go and wonder how I can recover and get back to
> > weekly-2012-01-27 as I don't have a fully functional go install at
> > this point.  Thanks!
>
> You can roll back to a previous version with:
>
>   hg update tag
>
> where tag is the tag you want to sync to. In this case I suggest you
> try the previous weekly:
>
>   hg update weekly.2012-03-04
>
> You may also want to check 'hg status' to see if there are any
> unwanted dreg files around.
>
> To be really sure you have a clean install you could rm the whole go
> tree and clone it again:
>
>   hg clonehttps://code.google.com/p/go
Reply all
Reply to author
Forward
0 new messages