]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agofmt: fix caching bug in Scan
Russ Cox [Tue, 31 Jan 2012 23:38:33 +0000 (18:38 -0500)]
fmt: fix caching bug in Scan

Black box test is too time-consuming, as the bug
does not appear until Scan has processed 2 GB of
input in total across multiple calls, so no test.

Thanks to Frederick Mayle for the diagnosis and fix.

Fixes #2809.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5611043

13 years agonet: remove types InvalidConnError and UnknownSocketError
Brad Fitzpatrick [Tue, 31 Jan 2012 23:04:42 +0000 (15:04 -0800)]
net: remove types InvalidConnError and UnknownSocketError

Both are unused and undocumented.

InvalidConnError is also non-idiomatic: a FooError type can
typically describe something, else it would be an ErrFoo
variable.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5609045

13 years agocmd/go: improvements
Russ Cox [Tue, 31 Jan 2012 22:40:36 +0000 (17:40 -0500)]
cmd/go: improvements

Do not treat $GOROOT/src/pkg, $GOROOT/src/cmd,
$GOPATH/src as package directories (only subdirectories
of those can be package directories).  Fixes issue 2602.

Accept additional compiler and linker arguments during
cgo from $CGO_CFLAGS and $CGO_LDFLAGS, as the
Makefiles used to do.

Show failed pkg-config output.  Fixes issue 2785.

Use different (perhaps better) git commands.  Fixes issue 2109.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5605045

13 years agogo: record location of failed imports for error reporting.
Rémy Oudompheng [Tue, 31 Jan 2012 22:37:01 +0000 (23:37 +0100)]
go: record location of failed imports for error reporting.

Fixes #2664.

R=rsc
CC=golang-dev, remy
https://golang.org/cl/5593047

13 years agogc: diagnose \ in import path
Russ Cox [Tue, 31 Jan 2012 22:29:59 +0000 (17:29 -0500)]
gc: diagnose \ in import path

R=ken2
CC=golang-dev
https://golang.org/cl/5609044

13 years agobuild: remove ./ from buildscripts
Russ Cox [Tue, 31 Jan 2012 21:53:43 +0000 (16:53 -0500)]
build: remove ./ from buildscripts

Fixes #2753.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5609043

13 years agonet: move DNSConfigError to a portable file
Brad Fitzpatrick [Tue, 31 Jan 2012 21:01:34 +0000 (13:01 -0800)]
net: move DNSConfigError to a portable file

The type being unavailable on Windows was the only API
signature difference in the net package.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5608043

13 years agocmd/go: improvements
Russ Cox [Tue, 31 Jan 2012 20:08:20 +0000 (15:08 -0500)]
cmd/go: improvements

Print build errors to stderr during 'go run'.
Stream test output during 'go test' (no args).  Fixes issue 2731.
Add go test -i to install test dependencies.  Fixes issue 2685.
Fix data race in exitStatus.  Fixes issue 2709.
Fix tool paths.  Fixes issue 2817.

R=golang-dev, bradfitz, n13m3y3r, r
CC=golang-dev
https://golang.org/cl/5591045

13 years agocmd/go: fix handling of gccgo standard library.
Rémy Oudompheng [Tue, 31 Jan 2012 18:41:38 +0000 (19:41 +0100)]
cmd/go: fix handling of gccgo standard library.

The previous logic was mainly non-working. It only needs to
ensure that the go tool doesn't try to build the standard
library with gccgo.

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/5580051

13 years agogo/doc: enable AllMethods flag (and fix logic)
Robert Griesemer [Tue, 31 Jan 2012 17:48:10 +0000 (09:48 -0800)]
go/doc: enable AllMethods flag (and fix logic)

- enable AllMethods flag (default: not set)
- fix logic determining which methods to show
- added respective test case in testdata/e.go for AllMethods = false
- added test case set for AllMethods = true

The critical changes/files to look at are:
- testdata/e{0,1,2}.golden: T4.M should only show up as method of T5 in e2.golden
- reader.go: always include top-level methods, and negate former logic for embedded methods
  (rewrote as a switch for better comprehensability)

Fixes #2791.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5576057

13 years agonet/http: close client fd sooner on response read error
Brad Fitzpatrick [Tue, 31 Jan 2012 17:45:13 +0000 (09:45 -0800)]
net/http: close client fd sooner on response read error

This fixes some test noise in TestStressSurpriseServerCloses when
ulimit -n something low, like 256 on a Mac.

Previously, when the server closed on us and we were expecting more
responses (like we are in that test), we'd read an "Unexpected EOF"
and just forget about the client's net.Conn.  Now it's closed,
rather than waiting on the finalizer to release the fd.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5602043

13 years agonet: disable normal multicast testing on linux/arm
Mikio Hara [Tue, 31 Jan 2012 17:42:56 +0000 (02:42 +0900)]
net: disable normal multicast testing on linux/arm

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5603043

13 years agocrypto/elliptic: p224Contract could produce a non-minimal representation.
Adam Langley [Tue, 31 Jan 2012 17:27:42 +0000 (12:27 -0500)]
crypto/elliptic: p224Contract could produce a non-minimal representation.

I missed an overflow in contract because I suspected that the prime
elimination would take care of it. It didn't, and I forgot to get back
to the overflow. Because of this, p224Contract may have produced a
non-minimal representation, causing flakey failures ~0.02% of the
time.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5592045

13 years agonet: ListenMulticastUDP to listen concurrently across multiple listeners
Mikio Hara [Tue, 31 Jan 2012 16:53:26 +0000 (01:53 +0900)]
net: ListenMulticastUDP to listen concurrently across multiple listeners

This CL introduces new function ListenMulticastUDP to fix
multicast UDP listening across multiple listeners issue,
to replace old multicast methods JoinGroup and LeaveGroup
on UDPConn.

This CL also enables multicast testing by default.

Fixes #2730.

R=rsc, paul.a.lalonde, fullung, devon.odell
CC=golang-dev
https://golang.org/cl/5562048

13 years agocrypto/tls: better error message when connecting to SSLv3 servers.
Adam Langley [Tue, 31 Jan 2012 16:22:47 +0000 (11:22 -0500)]
crypto/tls: better error message when connecting to SSLv3 servers.

We support SSLv3 as a server but not as a client (and we don't want to
support it as a client). This change fixes the error message when
connecting to an SSLv3 server since SSLv3 support on the server side
made mutualVersion accept SSLv3.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5545073

13 years agonet: fix windows build
Russ Cox [Tue, 31 Jan 2012 16:20:34 +0000 (11:20 -0500)]
net: fix windows build

TBR=mikioh
CC=golang-dev
https://golang.org/cl/5588048

13 years agocrypto/x509: use case-insensitive hostname matching.
Adam Langley [Tue, 31 Jan 2012 16:00:16 +0000 (11:00 -0500)]
crypto/x509: use case-insensitive hostname matching.

Fixes #2792.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5590045

13 years ago5l: optimize the common case in patch()
Shenghou Ma [Tue, 31 Jan 2012 15:59:34 +0000 (10:59 -0500)]
5l: optimize the common case in patch()
    If p->to.sym->text is non-nil, then no need to search for sym->value.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5601046

13 years ago5l: make -v option output less nonessential clutter
Shenghou Ma [Tue, 31 Jan 2012 15:59:29 +0000 (10:59 -0500)]
5l: make -v option output less nonessential clutter
        5l -v is for benchmarking various parts of the loader, but this code in
        obj.c will clutter the output. I only comment them out, because this is
        on par with 8l/6l.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5600046

13 years agobuild: move goapi, quietgcc, cgo, gotype, ebnflint into go-tool
Russ Cox [Tue, 31 Jan 2012 15:38:07 +0000 (10:38 -0500)]
build: move goapi, quietgcc, cgo, gotype, ebnflint into go-tool

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5552054

13 years agocmd/go: clean test directories as they complete
Joel Sing [Tue, 31 Jan 2012 15:37:21 +0000 (10:37 -0500)]
cmd/go: clean test directories as they complete

A go build currently generates around 400MB of test output prior to
cleaning up. With this change we use a maximum of ~15MB.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5588044

13 years agonet: replace error variable name e, errno with err
Mikio Hara [Tue, 31 Jan 2012 15:36:45 +0000 (00:36 +0900)]
net: replace error variable name e, errno with err

R=rsc, r
CC=golang-dev
https://golang.org/cl/5593046

13 years agocmd/ld: fix gdbscript
Wei Guangjing [Tue, 31 Jan 2012 15:32:24 +0000 (10:32 -0500)]
cmd/ld: fix gdbscript

R=golang-dev, lvd
CC=golang-dev
https://golang.org/cl/5601058

13 years agoos/exec: TestExtraFiles - close any leaked file descriptors
Joel Sing [Tue, 31 Jan 2012 11:09:06 +0000 (22:09 +1100)]
os/exec: TestExtraFiles - close any leaked file descriptors

Ensure that file descriptors have not already been leaked into our
environment - close any that are open at the start of the
TestExtraFiles test.

Also use the appropriate command for listing open files.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5574062

13 years agotest: float to integer test case
Ian Lance Taylor [Tue, 31 Jan 2012 05:39:38 +0000 (21:39 -0800)]
test: float to integer test case

gccgo currently fails this test:

fixedbugs/bug402.go:12:9: error: floating point constant truncated to integer
fixedbugs/bug402.go:13:8: error: floating point constant truncated to integer

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5600050

13 years agoruntime: use per-map hash seeds
Damian Gryski [Tue, 31 Jan 2012 05:37:03 +0000 (00:37 -0500)]
runtime: use per-map hash seeds

This patch adds a hash seed to the Hmap struct.  Each seed is
initialized by runtime.fastrand1().  This is the first step of a
solution to issue 2630.  Fastrand1 still needs to be updated to provide
us with actually random bits.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5599046

13 years agoA+C: Damian Gryski (individual CLA)
Russ Cox [Tue, 31 Jan 2012 05:30:44 +0000 (00:30 -0500)]
A+C: Damian Gryski (individual CLA)

R=golang-dev
CC=golang-dev
https://golang.org/cl/5600055

13 years agobuild: fix again
Russ Cox [Tue, 31 Jan 2012 05:06:33 +0000 (00:06 -0500)]
build: fix again

The new cross-compiling bin target was breaking
everything but the system where buildscript.sh ran.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5598055

13 years agobuild: fix buildscripts
Russ Cox [Tue, 31 Jan 2012 04:48:57 +0000 (23:48 -0500)]
build: fix buildscripts

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5600054

13 years agobuild: remove Make.pkg, Make.tool
Russ Cox [Tue, 31 Jan 2012 04:43:46 +0000 (23:43 -0500)]
build: remove Make.pkg, Make.tool

Consequently, remove many package Makefiles,
and shorten the few that remain.

gomake becomes 'go tool make'.

Turn off test phases of run.bash that do not work,
flagged with $BROKEN.  Future CLs will restore these,
but this seemed like a big enough CL already.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5601057

13 years agogo: improvements
Russ Cox [Tue, 31 Jan 2012 04:42:41 +0000 (23:42 -0500)]
go: improvements

Add 'go clean'.
Make 'go build' write to pkgname, not a.out.
Make 'go test -c' write to pkgname.test, not test.out.
Make 'go install' write alternate binaries to .../bin/goos_goarch/.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5600048

13 years agobuild: force numerical comparison in version.bash
Russ Cox [Tue, 31 Jan 2012 04:33:16 +0000 (23:33 -0500)]
build: force numerical comparison in version.bash

Fixes #2436.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5576075

13 years agotest: attempt at making a test more robust
Brad Fitzpatrick [Tue, 31 Jan 2012 04:17:34 +0000 (20:17 -0800)]
test: attempt at making a test more robust

A current theory is that this test is too fast for the
time resolution on the VMs where our builders run.

R=rsc
CC=golang-dev
https://golang.org/cl/5581056

13 years agoruntime: fix mkasmh.sh for arm?
Russ Cox [Tue, 31 Jan 2012 04:17:11 +0000 (23:17 -0500)]
runtime: fix mkasmh.sh for arm?

The builder is Debian, so maybe running dash,
the shell that time forgot.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5600053

13 years agoruntime: fix mkasmh.h
Anthony Martin [Tue, 31 Jan 2012 03:25:40 +0000 (19:25 -0800)]
runtime: fix mkasmh.h

We weren't properly deleting the various header
files (that were temporarily renamed) if a $CC
for the current $GOARCH didn't exist.  And since
the compiler checks the current directory for
headers before any -I arguments, this had the
unfortunate side effect of including the last
generated headers instead of the correct ones.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5581055

13 years agoimage: remove image/bmp and image/tiff from std.
Nigel Tao [Tue, 31 Jan 2012 03:01:53 +0000 (14:01 +1100)]
image: remove image/bmp and image/tiff from std.

They have moved to the code.google.com/p/go.image subrepo.

R=rsc
CC=golang-dev
https://golang.org/cl/5552052

13 years agodoc: add image/{bmp,tiff} renames to go1.tmpl.
Nigel Tao [Tue, 31 Jan 2012 01:29:00 +0000 (12:29 +1100)]
doc: add image/{bmp,tiff} renames to go1.tmpl.

R=r
CC=golang-dev
https://golang.org/cl/5598052

13 years agofix: add image/{bmp,tiff} to go1pkgrename.
Nigel Tao [Tue, 31 Jan 2012 01:27:58 +0000 (12:27 +1100)]
fix: add image/{bmp,tiff} to go1pkgrename.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5581053

13 years agodoc: update weekly snapshot notes with subrepo changes
Andrew Gerrand [Tue, 31 Jan 2012 01:15:33 +0000 (12:15 +1100)]
doc: update weekly snapshot notes with subrepo changes

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5599051

13 years agodashboard: better ui layout for subrepo status
Andrew Gerrand [Tue, 31 Jan 2012 01:09:56 +0000 (12:09 +1100)]
dashboard: better ui layout for subrepo status

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5595048

13 years agocmd/pack: change gopack to pack in error messages
Rob Pike [Mon, 30 Jan 2012 23:44:27 +0000 (15:44 -0800)]
cmd/pack: change gopack to pack in error messages

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5598051

13 years agorun.bash: s/make/gomake
Rob Pike [Mon, 30 Jan 2012 23:34:34 +0000 (15:34 -0800)]
run.bash: s/make/gomake
attempt to fix freebsd build
TBR=rsc

R=rsc
CC=golang-dev
https://golang.org/cl/5576077

13 years agogo/spec: Update language on map types.
Robert Griesemer [Mon, 30 Jan 2012 23:31:33 +0000 (15:31 -0800)]
go/spec: Update language on map types.

Fixes #2803.

R=r
CC=golang-dev
https://golang.org/cl/5601053

13 years agogo: move compilers into the go-tool directory
Rob Pike [Mon, 30 Jan 2012 22:46:31 +0000 (14:46 -0800)]
go: move compilers into the go-tool directory
Also delete gotest, since it's messy to fix and slated for deletion anyway.
A couple of things outside src can't be tested any more. "go test" will be
fixed and these tests will be re-enabled. They're noisy for now.

Fixes #284.

R=rsc
CC=golang-dev
https://golang.org/cl/5598049

13 years agobuildscript.sh: now works correctly on windows
Alex Brainman [Mon, 30 Jan 2012 22:42:33 +0000 (09:42 +1100)]
buildscript.sh: now works correctly on windows

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5569092

13 years agogodoc: sort list of "other packages"
Robert Griesemer [Mon, 30 Jan 2012 22:31:51 +0000 (14:31 -0800)]
godoc: sort list of "other packages"

Fixes #2786.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/5581050

13 years agogodoc: add URL mode m=methods
Robert Griesemer [Mon, 30 Jan 2012 22:07:50 +0000 (14:07 -0800)]
godoc: add URL mode m=methods

If set, all methods are shown, not just those
of non-exported anonynous fields.

This change will only become functional once
CL 5576057 is submitted.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5599048

13 years agobuild: fix buildscript breakage after all.bash
Brad Fitzpatrick [Mon, 30 Jan 2012 20:08:35 +0000 (12:08 -0800)]
build: fix buildscript breakage after all.bash

Fix from Russ. Tested that multiple builds in a row
work again.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5599047

13 years agodoc: use consistent receiver names, when it makes sense.
Brad Fitzpatrick [Mon, 30 Jan 2012 19:58:49 +0000 (11:58 -0800)]
doc: use consistent receiver names, when it makes sense.

Makes for prettier docs.

R=golang-dev, dsymonds, r, rsc
CC=golang-dev
https://golang.org/cl/5576056

13 years agojson: remove old optimization that inlining covers now
Brad Fitzpatrick [Mon, 30 Jan 2012 19:42:09 +0000 (11:42 -0800)]
json: remove old optimization that inlining covers now

Benchmarks look the same.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5572080

13 years agogo: don't clobber command install paths
Anthony Martin [Mon, 30 Jan 2012 18:54:22 +0000 (13:54 -0500)]
go: don't clobber command install paths

This fixes a regression that was made when adding
support for building with gccgo (in d6a14e6fac0c).

External commands (those not from the Go tree) were
being installed to the package directory instead of
the binary directory.

R=golang-dev, rsc, adg, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/5564072

13 years agotest: add test of NaN in map
Russ Cox [Mon, 30 Jan 2012 18:41:38 +0000 (13:41 -0500)]
test: add test of NaN in map

R=iant, r
CC=golang-dev
https://golang.org/cl/5576071

13 years agocodereview: ignore test files during 'hg gofmt'
Russ Cox [Mon, 30 Jan 2012 18:41:29 +0000 (13:41 -0500)]
codereview: ignore test files during 'hg gofmt'

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5581047

13 years agoencoding/xml: fix decoding of xml.Name with sub-elements
Gustavo Niemeyer [Mon, 30 Jan 2012 18:32:48 +0000 (16:32 -0200)]
encoding/xml: fix decoding of xml.Name with sub-elements

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5569090

13 years agogopack: rename pack, move to go-tool directory
Rob Pike [Mon, 30 Jan 2012 18:30:46 +0000 (10:30 -0800)]
gopack: rename pack, move to go-tool directory

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5598045

13 years agocompress/flate: undo misuse of skipNever
Russ Cox [Mon, 30 Jan 2012 18:24:20 +0000 (13:24 -0500)]
compress/flate: undo misuse of skipNever

I assume this was a too aggressive search-and-replace.

R=imkrasin
CC=golang-dev
https://golang.org/cl/5580047

13 years agofmt: add test of NaN map keys
Russ Cox [Mon, 30 Jan 2012 18:20:38 +0000 (13:20 -0500)]
fmt: add test of NaN map keys

R=r
CC=golang-dev
https://golang.org/cl/5564063

13 years ago8g: use uintptr for local pc
Russ Cox [Mon, 30 Jan 2012 18:20:10 +0000 (13:20 -0500)]
8g: use uintptr for local pc

Fixes #2478.

R=ken2
CC=golang-dev
https://golang.org/cl/5593051

13 years agomake.bash: don't remove hgpatch
Rob Pike [Mon, 30 Jan 2012 18:15:43 +0000 (10:15 -0800)]
make.bash: don't remove hgpatch

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5598046

13 years agocmd/go: fix including of _cgo_export.h
Gustavo Niemeyer [Mon, 30 Jan 2012 18:04:45 +0000 (16:04 -0200)]
cmd/go: fix including of _cgo_export.h

This will add the temporary object directory into the lookup
path so that cgo-exported function declarations may be
included from C files.

R=golang-dev, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/5600043

13 years agopkg/go/scanner: Fix Typical use output
Olivier Duperray [Mon, 30 Jan 2012 17:58:25 +0000 (09:58 -0800)]
pkg/go/scanner: Fix Typical use output

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5595045

13 years agoruntime: fix float64 hash
Russ Cox [Mon, 30 Jan 2012 16:10:59 +0000 (11:10 -0500)]
runtime: fix float64 hash

R=ken2
CC=golang-dev
https://golang.org/cl/5580046

13 years agonet/http: Fix nil pointer dereference in error case.
Volker Dobler [Mon, 30 Jan 2012 15:57:50 +0000 (07:57 -0800)]
net/http: Fix nil pointer dereference in error case.

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/5598044

13 years agoos/user: windows implementation
Alex Brainman [Mon, 30 Jan 2012 11:59:10 +0000 (22:59 +1100)]
os/user: windows implementation

pjmlp gets credit for initial version.

Fixes #1789.

R=paulo.jpinto, bradfitz, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/5543069

13 years agobuild: use correct go-tool directory location
Alex Brainman [Mon, 30 Jan 2012 05:43:28 +0000 (16:43 +1100)]
build: use correct go-tool directory location

R=golang-dev, rsc, cw, rsc
CC=golang-dev
https://golang.org/cl/5576070

13 years agocmd/goapi: expand embedded interfaces
Brad Fitzpatrick [Mon, 30 Jan 2012 05:04:13 +0000 (21:04 -0800)]
cmd/goapi: expand embedded interfaces

Fixes #2801

R=rsc
CC=golang-dev
https://golang.org/cl/5576068

13 years agobuilder: drop recover blocks
Andrew Gerrand [Mon, 30 Jan 2012 03:53:48 +0000 (14:53 +1100)]
builder: drop recover blocks

The one time they recovered from anything they obscured a useful stack
trace. We're better off just crashing hard.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5577073

13 years agodashboard: ask builders to re-build Go tip to freshen subrepos
Andrew Gerrand [Mon, 30 Jan 2012 03:50:36 +0000 (14:50 +1100)]
dashboard: ask builders to re-build Go tip to freshen subrepos

This ensures we always have results for subrepo-tip at go-tip.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5569091

13 years agogobuilder: use go tool to build and test sub-repositories
Andrew Gerrand [Mon, 30 Jan 2012 01:02:14 +0000 (12:02 +1100)]
gobuilder: use go tool to build and test sub-repositories

R=rsc
CC=golang-dev
https://golang.org/cl/5576047

13 years agodashboard: add sub-repositories to init list
Andrew Gerrand [Mon, 30 Jan 2012 00:59:06 +0000 (11:59 +1100)]
dashboard: add sub-repositories to init list
dashboard: add Kind to Package struct
dashboard: add kind parameter to /packages handler

R=rsc, bsiegert, rogpeppe
CC=golang-dev
https://golang.org/cl/5572062

13 years agocmd/goinstall: remove now that 'go get' works
Gustavo Niemeyer [Sun, 29 Jan 2012 19:22:20 +0000 (17:22 -0200)]
cmd/goinstall: remove now that 'go get' works

The changes to builder were not tested.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5572083

13 years agonet/http: set cookies in client jar on POST requests.
Volker Dobler [Sun, 29 Jan 2012 19:16:11 +0000 (14:16 -0500)]
net/http: set cookies in client jar on POST requests.

Cookies recieved in a response to a POST request are stored
in the client's jar like they are for GET requests.

R=golang-dev, rsc
CC=bradfitz, golang-dev
https://golang.org/cl/5576065

13 years agocmd/go: add go tools to rearrangement
Rob Pike [Sun, 29 Jan 2012 19:07:25 +0000 (11:07 -0800)]
cmd/go: add go tools to rearrangement
fix, vet
yacc is also fixed (it was wrong before)
All that's left is the commands used during compilation
This looks like a huge CL, but it's almost all file renames.
The action is in cmd/go/pkg.go, the Makefiles, and .../doc.go.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5595044

13 years agocmd/go: slightly less confusing error message
Rob Pike [Sun, 29 Jan 2012 19:06:39 +0000 (11:06 -0800)]
cmd/go: slightly less confusing error message
If the argument to go fix isn't a package directory, the message said nothing helpful.
Now it at least says a package couldn't be found.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5577072

13 years agocodereview: fix initialization check
Russ Cox [Sun, 29 Jan 2012 19:04:24 +0000 (14:04 -0500)]
codereview: fix initialization check

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5596046

13 years agocmd/go: c tools not used during compilation
Rob Pike [Sun, 29 Jan 2012 18:14:36 +0000 (10:14 -0800)]
cmd/go: c tools not used during compilation
cov, nm, pprof, prof

R=rsc, r, rsc
CC=golang-dev
https://golang.org/cl/5576067

13 years ago5l, 6l, 8l, ld: remove memory leaks
Shenghou Ma [Sun, 29 Jan 2012 17:46:26 +0000 (12:46 -0500)]
5l, 6l, 8l, ld: remove memory leaks

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5569085

13 years agocodereview: die if initialized twice
Russ Cox [Sun, 29 Jan 2012 17:33:13 +0000 (12:33 -0500)]
codereview: die if initialized twice

If this happens, something is misconfigured.
If we don't test for this explicitly, MatchAt ends
up calling itself recursively forever.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5576066

13 years agocmd/go: first piece of tool rearrangement
Rob Pike [Sun, 29 Jan 2012 17:19:05 +0000 (09:19 -0800)]
cmd/go: first piece of tool rearrangement
1) create go-tool dir in make.bash
2) clean up stale binaries in make.bash
3) add 'tool' command to go
4) convert goyacc->yacc as a first test tool
Since goyacc stands alone, it's a safe trial.

R=rsc
CC=golang-dev
https://golang.org/cl/5576061

13 years agonet: update comments to remove redundant "net" prefix
Mikio Hara [Sun, 29 Jan 2012 10:11:05 +0000 (19:11 +0900)]
net: update comments to remove redundant "net" prefix

R=rsc, r
CC=golang-dev
https://golang.org/cl/5569087

13 years agogc: use original constant expression in error messages.
Rémy Oudompheng [Sun, 29 Jan 2012 09:35:11 +0000 (10:35 +0100)]
gc: use original constant expression in error messages.

Fixes #2768.

R=golang-dev, lvd, iant
CC=golang-dev, remy
https://golang.org/cl/5572081

13 years agocmd/go: make vcs command actually gather output
Roger Peppe [Sat, 28 Jan 2012 12:02:22 +0000 (12:02 +0000)]
cmd/go: make vcs command actually gather output

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5577062

13 years agoos: remove SIGXXX signals variables.
Brad Fitzpatrick [Fri, 27 Jan 2012 22:47:02 +0000 (14:47 -0800)]
os: remove SIGXXX signals variables.

They're not portable, and pkg os is supposed to be portable.

Fixes #2562

R=golang-dev, mikioh.mikioh, r, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/5574078

13 years agogo/doc: don't show methods of exported anonymous fields
Robert Griesemer [Fri, 27 Jan 2012 22:45:47 +0000 (14:45 -0800)]
go/doc: don't show methods of exported anonymous fields

Added flag AllMethods: if not set (future default), embedded
methods of exported (and thus visible) embedded fields are not
shown in the final package documentation

The actual change for AllMethods is just in sortedFuncs. All
other changes are simplifications of the existing logic (mostly
deletion of code): Because method conflicts due to embedding
must always be detected, remove any premature elimination of
types and methods. Instead collect all named types and all
methods and do the filtering at the end.

Miscellaneous:
- renamed baseType -> namedType
- streamline logic for recording embedded types
- record embedded types via a map (simpler data structures)

AllMethods is set by default; so the output is unchanged and
the tests pass. The next CL will enable the AllMethods flag
and have adjusted tests (and fix issue 2791).

R=rsc
CC=golang-dev
https://golang.org/cl/5572076

13 years agogo/doc: added test case
Robert Griesemer [Fri, 27 Jan 2012 22:45:31 +0000 (14:45 -0800)]
go/doc: added test case

Don't show conflicting method embedded via
a visible and invisible anonymous field.

R=rsc
CC=golang-dev
https://golang.org/cl/5564064

13 years agogo: introduce support for "go build" with gccgo.
Rémy Oudompheng [Fri, 27 Jan 2012 22:05:51 +0000 (17:05 -0500)]
go: introduce support for "go build" with gccgo.

The use of gccgo is triggered by GC=gccgo in environment. It
still needs the standard distribution to behave properly, but
allows using the test, build, run, install subcommands with
gccgo.

R=rsc, iant, fullung
CC=golang-dev, remy
https://golang.org/cl/5562045

13 years agoreflect: add comment about Type.Field allocation
Russ Cox [Fri, 27 Jan 2012 21:11:17 +0000 (16:11 -0500)]
reflect: add comment about Type.Field allocation

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5586044

13 years agodoc: update Go1 release notes in light of the crypto/hmac change.
Adam Langley [Fri, 27 Jan 2012 18:12:27 +0000 (10:12 -0800)]
doc: update Go1 release notes in light of the crypto/hmac change.

R=r
CC=golang-dev
https://golang.org/cl/5532108

13 years agocompress/flate: remove unused huffmanEncoder.generateChains.
Ivan Krasin [Fri, 27 Jan 2012 17:52:58 +0000 (09:52 -0800)]
compress/flate: remove unused huffmanEncoder.generateChains.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5577061

13 years agoflag: allow a FlagSet to not write to os.Stderr
Brad Fitzpatrick [Fri, 27 Jan 2012 17:23:06 +0000 (09:23 -0800)]
flag: allow a FlagSet to not write to os.Stderr

Fixes #2747

R=golang-dev, gri, r, rogpeppe, r
CC=golang-dev
https://golang.org/cl/5564065

13 years agocgo: accept null pointers in gccgo flavour of C.GoString.
Rémy Oudompheng [Fri, 27 Jan 2012 08:36:53 +0000 (09:36 +0100)]
cgo: accept null pointers in gccgo flavour of C.GoString.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5569074

13 years agonet/rpc: fix data race on Call.Error
Dmitriy Vyukov [Fri, 27 Jan 2012 07:27:05 +0000 (11:27 +0400)]
net/rpc: fix data race on Call.Error
+eliminates a possibility of sending a call to Done several times.
+fixes memory leak in case of temporal Write errors.
+fixes data race on Client.shutdown.
+fixes data race on Client.closing.
+fixes comments.
Fixes #2780.

R=r, rsc
CC=golang-dev, mpimenov
https://golang.org/cl/5571063

13 years agotest: match gccgo error messages
Ian Lance Taylor [Fri, 27 Jan 2012 07:06:47 +0000 (23:06 -0800)]
test: match gccgo error messages

complit1.go:37:34: error: may only omit types within composite literals of slice, array, or map type
complit1.go:38:19: error: may only omit types within composite literals of slice, array, or map type
complit1.go:18:21: error: slice of unaddressable value
complit1.go:19:10: error: slice of unaddressable value
complit1.go:20:9: error: slice of unaddressable value

convert1.go:28:13: error: invalid type conversion
convert1.go:32:12: error: invalid type conversion (cannot use type string as type Tint64)
convert1.go:36:12: error: invalid type conversion
convert1.go:37:13: error: invalid type conversion
convert1.go:40:11: error: invalid type conversion
convert1.go:41:12: error: invalid type conversion
convert1.go:44:12: error: invalid type conversion
convert1.go:46:13: error: invalid type conversion
convert1.go:48:11: error: invalid type conversion
convert1.go:50:12: error: invalid type conversion
convert1.go:52:6: error: invalid type conversion
convert1.go:53:12: error: invalid type conversion
convert1.go:54:12: error: invalid type conversion
convert1.go:56:13: error: invalid type conversion
convert1.go:57:11: error: invalid type conversion
convert1.go:58:11: error: invalid type conversion
convert1.go:64:13: error: invalid type conversion
convert1.go:68:12: error: invalid type conversion (cannot use type Tstring as type Tint64)
convert1.go:72:12: error: invalid type conversion
convert1.go:73:13: error: invalid type conversion
convert1.go:76:11: error: invalid type conversion (cannot use type Tbyte as type Trune)
convert1.go:77:12: error: invalid type conversion (cannot use type Tbyte as type Tint64)
convert1.go:80:12: error: invalid type conversion
convert1.go:82:13: error: invalid type conversion
convert1.go:84:11: error: invalid type conversion (cannot use type Trune as type Tbyte)
convert1.go:86:12: error: invalid type conversion (cannot use type Trune as type Tint64)
convert1.go:88:6: error: invalid type conversion (cannot use type Tint64 as type string)
convert1.go:89:12: error: invalid type conversion
convert1.go:90:12: error: invalid type conversion
convert1.go:92:13: error: invalid type conversion (cannot use type Tint64 as type Tstring)
convert1.go:93:11: error: invalid type conversion (cannot use type Tint64 as type Tbyte)
convert1.go:94:11: error: invalid type conversion (cannot use type Tint64 as type Trune)

fixedbugs/bug195.go:9:21: error: interface contains embedded non-interface
fixedbugs/bug195.go:12:21: error: interface contains embedded non-interface
fixedbugs/bug195.go:15:15: error: interface contains embedded non-interface
fixedbugs/bug195.go:18:2: error: invalid recursive interface
fixedbugs/bug195.go:26:2: error: invalid recursive interface
fixedbugs/bug195.go:22:2: error: invalid recursive interface

fixedbugs/bug251.go:15:2: error: invalid recursive interface
fixedbugs/bug251.go:11:2: error: invalid recursive interface

fixedbugs/bug374.go:18:34: error: use of undefined type ‘xxxx’
fixedbugs/bug374.go:16:5: error: incompatible type in initialization (incompatible type for method ‘m’ (different number of parameters))

fixedbugs/bug383.go:11:2: error: expected boolean expression
fixedbugs/bug383.go:12:2: error: expected boolean expression

fixedbugs/bug386.go:10:25: error: incompatible type for return value 1 (type has no methods)
fixedbugs/bug386.go:12:25: error: incompatible type for return value 1 (type has no methods)

fixedbugs/bug388.go:12:10: error: invalid named/anonymous mix
fixedbugs/bug388.go:17:19: error: non-name on left side of ‘:=’
fixedbugs/bug388.go:22:9: error: non-name on left side of ‘:=’
fixedbugs/bug388.go:27:10: error: expected type
fixedbugs/bug388.go:32:9: error: expected type
fixedbugs/bug388.go:23:14: error: reference to field ‘i’ in object which has no fields or methods
fixedbugs/bug388.go:18:18: error: invalid use of type

fixedbugs/bug389.go:12:5: error: incompatible type in initialization (different parameter types)

fixedbugs/bug390.go:15:24: error: expected integer, floating, or complex type

fixedbugs/bug394.go:10:1: error: expected declaration

fixedbugs/bug397.go:12:2: error: incompatible type for element 2 key in map construction

switch3.go:18:2: error: incompatible types in binary expression
switch3.go:22:2: error: incompatible types in binary expression
switch3.go:28:2: error: map can only be compared to nil
switch3.go:35:2: error: slice can only be compared to nil
switch3.go:42:2: error: func can only be compared to nil

syntax/else.go:11:9: error: expected ‘if’ or ‘{’

typeswitch2.go:15:2: error: duplicate type in switch
typeswitch2.go:19:2: error: duplicate type in switch
typeswitch2.go:26:2: error: duplicate type in switch
typeswitch2.go:40:9: error: ‘t’ declared and not used

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5573073

13 years agotag weekly.2012-01-27
Andrew Gerrand [Fri, 27 Jan 2012 06:53:11 +0000 (17:53 +1100)]
tag weekly.2012-01-27

R=nigeltao
CC=golang-dev
https://golang.org/cl/5576054

13 years agoweekly.2012-01-27 weekly.2012-01-27
Andrew Gerrand [Fri, 27 Jan 2012 06:51:53 +0000 (17:51 +1100)]
weekly.2012-01-27

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5577060

13 years agogc: remove extra paranoia from inlining unsafe.Pointer fix.
David Symonds [Fri, 27 Jan 2012 02:59:32 +0000 (13:59 +1100)]
gc: remove extra paranoia from inlining unsafe.Pointer fix.

R=rsc
CC=golang-dev
https://golang.org/cl/5569075

13 years agocmd/go: solve ambiguity of get lp.net/project/foo
Gustavo Niemeyer [Fri, 27 Jan 2012 02:58:24 +0000 (00:58 -0200)]
cmd/go: solve ambiguity of get lp.net/project/foo

This solves the ambiguity for "lp.net/project/foo". In these URLs,
"foo" could be a series name registered in Launchpad with its own
branch, and it could also be the name of a directory within the
main project branch one level up.

Solve it by testing if the series branch exists in Launchpad
and if it doesn't moving the root one level up.

R=rsc
CC=golang-dev
https://golang.org/cl/5577058

13 years agogc: permit unsafe.Pointer for inlined functions.
David Symonds [Fri, 27 Jan 2012 02:44:48 +0000 (13:44 +1100)]
gc: permit unsafe.Pointer for inlined functions.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5573075

13 years agoarchive/zip: add functions to convert between os.FileInfo & FileHeader
Brad Fitzpatrick [Thu, 26 Jan 2012 23:31:09 +0000 (15:31 -0800)]
archive/zip: add functions to convert between os.FileInfo & FileHeader

Fixes #2186

R=golang-dev, gri, adg
CC=golang-dev
https://golang.org/cl/5579044

13 years ago database/sql: convert SQL null values to []byte as nil.
James P. Cooper [Thu, 26 Jan 2012 23:12:48 +0000 (15:12 -0800)]
database/sql: convert SQL null values to []byte as nil.

Also allow string values to scan into []byte.
Fixes #2788.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5577054