- 01 Mar, 2012 26 commits
-
-
Robert Griesemer authored
(Semi-automatically detected.) R=golang-dev, remyoudompheng, r CC=golang-dev https://golang.org/cl/5715052
-
Russ Cox authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5716057
-
Robert Griesemer authored
- Define what it means for two identifiers to be unique. - The current spec is incorrect about exported identifiers: for instance, it excluded fields of non-exported types of exported variables from being exported. It is easier to leave the detailed specification away and let the rest of the spec govern access of exported identifiers. - The current spec is incorrect about qualified identifiers: It simply required that an identifier be exported to be valid in a qualified identifier. However, qualified identifiers can only access exported identifiers declared in the package block of the imported package. Fixes #1551. R=r, rsc, iant, ken CC=golang-dev https://golang.org/cl/5711043
-
Russ Cox authored
Fixes #3165. R=golang-dev, iant CC=golang-dev https://golang.org/cl/5712051
-
Robert Griesemer authored
- more idiomatic examples of pointer types - show use of _ in examples of function types - remove "legal:" qualification in examples for consistency R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5711054
-
Gustavo Niemeyer authored
No real problem. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5717049
-
Dmitriy Vyukov authored
R=golang-dev, rsc, bradfitz CC=golang-dev https://golang.org/cl/5715046
-
Dmitriy Vyukov authored
The docs look awkward - there is a paragraph "For example:" with a plain text example, and straight below it a real Example. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5717048
-
Russ Cox authored
* Install tools into tool dir always (Fixes issue 3049. Fixes issue 2868. Fixes issue 2925.) * Make packages depend on compiler, linker (Fixes issue 3036.) * Do not recompile packages across roots (Fixes issue 3149.) * Allow use of binary-only packages (Fixes issue 2775.) * Avoid duplicate cgo dependencies (Fixes issue 3001.) * Show less in go get -x. (Fixes issue 2926.) * Do not force repo root for existing checkout (Fixes issue 2969.) * Show full syntax error list always (Fixes issue 2811.) * Clean arguments before processing (Fixes issue 3034.) * Add flags for compiler, linker arguments (Fixes issue 2996.) * Pass flags in make.bash (Fixes issue 3091.) * Unify build flags, defined in one place. * Clean up error messages (Fixes issue 3075. Fixes issue 2923.) * Support local import paths (Fixes issue 3118.) * Allow top-level package outside $GOPATH (Fixes issue 3009.) In addition to these fixes, all commands now take a list of go files as a way to specify a single package, just as go build and go run always have. This means you can: go list -json x.go go fix x.go go vet x.go go test x_test.go Preliminary tests in test.bash. Mainly testing things that the ordinary build does not. I don't mind if the script doesn't run on Windows. I expect that gccgo support is now broken, and I hope that people will feel free to file issues and/or send CLs to fix it. :-) R=golang-dev, dsymonds, r, rogpeppe CC=golang-dev https://golang.org/cl/5708054
-
Russ Cox authored
This is an API change, but one I have been promising would happen when it was clear what the go command needed. This is basically a complete replacement of what used to be here. build.Tree is gone. build.DirInfo is expanded and now called build.Package. build.FindTree is now build.Import(package, srcDir, build.FindOnly). The returned *Package contains information that FindTree returned, but applicable only to a single package. build.ScanDir is now build.ImportDir. build.FindTree+build.ScanDir is now build.Import. The new Import API allows specifying the source directory, in order to resolve local imports (import "./foo") and also allows scanning of packages outside of $GOPATH. They will come back with less information in the Package, but they will still work. The old go/build API exposed both too much and too little. This API is much closer to what the go command needs, and it works well enough in the other places where it is used. Path is gone, so it can no longer be misused. (Fixes issue 2749.) This CL updates clients of go/build other than the go command. The go command changes are in a separate CL, to be submitted at the same time. R=golang-dev, r, alex.brainman, adg CC=golang-dev https://golang.org/cl/5713043
-
Russ Cox authored
Fixes #3134. R=golang-dev, r CC=golang-dev https://golang.org/cl/5713049
-
Russ Cox authored
Fixes #3125. R=golang-dev, r, minux.ma CC=golang-dev https://golang.org/cl/5714049
-
Russ Cox authored
R=golang-dev, gri CC=golang-dev https://golang.org/cl/5711052
-
Ian Lance Taylor authored
gccgo did not handle this correctly. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5714050
-
Anthony Martin authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5714051
-
Shenghou Ma authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5717046
-
David Symonds authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5714052
-
David Symonds authored
Fixes #3127. R=rsc, r CC=golang-dev https://golang.org/cl/5707054
-
Alex Brainman authored
Fixes #3154. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/5707052
-
Ian Lance Taylor authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5715044
-
David Symonds authored
Fixes #3160. R=r CC=golang-dev https://golang.org/cl/5716046
-
Andrew Gerrand authored
R=golang-dev, r, alex.brainman, r, mike.rosset CC=golang-dev https://golang.org/cl/5697050
-
Rob Pike authored
Fixes #2742. R=golang-dev, peterthrun, adg CC=golang-dev https://golang.org/cl/5699083
-
Ian Lance Taylor authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5713045
-
Robert Griesemer authored
Applied gofmt -w src misc (no changes). Fixes #3147. R=r, rsc CC=golang-dev https://golang.org/cl/5710046
-
Rob Pike authored
Updates #1599. R=golang-dev, bradfitz, rsc, r CC=golang-dev https://golang.org/cl/5708056
-
- 29 Feb, 2012 14 commits
-
-
Stefan Nilsson authored
R=golang-dev, gri CC=golang-dev https://golang.org/cl/5707065
-
Johan Euphrosine authored
Originally published on The Go Programming Language Blog, September 6, 2011. http://blog.golang.org/2011/09/laws-of-reflection.html Update #2547 R=golang-dev, r, adg CC=golang-dev https://golang.org/cl/5689054
-
Mikio Hara authored
go test -short # like in the build; no external stuff go test # long tests, + external go test -external=false # long tests, no external R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5696079
-
Anthony Martin authored
The two string comparison optimizations were missing the implicit cast from ideal bool. Fixes #3119. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5696071
-
Russ Cox authored
The strikes against it are: 1. It does not take path boundaries into account. 2. It assumes that Windows==case-insensitive file system and non-Windows==case-sensitive file system, neither of which is always true. 3. Comparing ToLower against ToLower is not a correct implementation of a case-insensitive string comparison. 4. If it returns true on Windows you still don't know how long the matching prefix is in bytes, so you can't compute what the suffix is. R=golang-dev, r, dsymonds, r CC=golang-dev https://golang.org/cl/5712045
-
Brad Fitzpatrick authored
In -test.short mode, skip measuring the upper bound of time sleeps. The API only guarantees minimum bounds on sleeps, anyway, so this isn't a bug we're ignoring as much as it is simply observing bad builder virtualization and/or loaded machines. We keep the test in full mode where developers will presumably be running on a lightly-loaded, native, fast machine. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5713044
-
Russ Cox authored
When we first wrote the method set definition, we had long discussions about whether method sets applied to all types or just named types, and we (or at least I) concluded that it didn't matter: the two were equivalent points of view, because the only way to introduce a new method was to write a method function, which requires a named receiver type. However, the addition of embedded types changed this. Embedding can introduce a method without writing an explicit method function, as in: var x struct { sync.Mutex } var px *struct { sync.Mutex } var _, _ sync.Locker = &x, px The edits in this CL make clear that both &x and px satisfy sync.Locker. Today, gccgo already works this way; 6g does not. R=golang-dev, gri, iant, r CC=golang-dev https://golang.org/cl/5702062
-
Russ Cox authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5711044
-
Russ Cox authored
R=golang-dev, r, bradfitz, gustavo CC=golang-dev https://golang.org/cl/5712044
-
Russ Cox authored
They are broken and hard to make work. They have never worked: if you import "/tmp/x" from "/home/rsc/p.c" then the compiler rewrites this into import "/home/rsc/tmp/x", which is clearly wrong. Also we just disallowed the : character in import paths, so import "c:/foo" is already not allowed. Finally, in order to support absolute paths well in a build tool we'd have to provide a mechanism to instruct the compiler to resolve absolute imports by looking in some other tree (where the binaries live) and provide a mapping from absolute path to location in that tree. This CL avoids adding that complexity. This is not part of the language spec (and should not be), so no spec change is needed. If we need to make them work later, we can. R=ken2 CC=golang-dev https://golang.org/cl/5712043
-
Russ Cox authored
In the current TOC it sticks out quite a bit. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5705053
-
Brad Fitzpatrick authored
Might fix issue 3050 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5708066
-
Shenghou Ma authored
R=rsc, bsiegert CC=golang-dev https://golang.org/cl/5709060
-
Robert Griesemer authored
Fix for minor inconsistency. R=golang-dev, iant CC=golang-dev https://golang.org/cl/5709058
-