To make the dashboard more flexible with different VCS, the Repo now depends on the VCS package for running commands.
* Exported Repo.Master
* Modified RemoteRepo to return a repo and an error
* Reimplemented all Repo methods using vcs package
* Removed hgCmd
* Removed repoURL
* Removed scheme from hgUrl since vcs.RepoRootForImportPath decides the scheme.
* Changed waitWithTimeout into timeout
* Added waitForFuncWithTimeout to wrap vcs commands with a timeout.
R=adg
CC=golang-dev
https://golang.org/cl/13201043
Update golang/go#6212
See issue 6259.
When that is resolved, we can do a better job. Until then, we just see if the
type has a method called Format and, if so, assume it's a Formatter and so
there's nothing to check.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/13267043
+ Tests.
+ Emacs integration.
+ Emacs integration test.
+ very rudimentary Vim integration. Needs some love from a Vim user.
TODO (in follow-ups):
- More tests would be good.
We'll need to make the output order deterministic in more places.
- Documentation.
R=gri, crawshaw, dominik.honnef
CC=golang-dev
https://golang.org/cl/9502043
Before, VarValue looked for the ssa.Value for the 'var' object
in the same package as the object was defined, but this is
(obviously) wrong for a cross-package FieldVal selection,
expr.f. The caller must provide the package containing the
reference.
+ test.
Also:
- add 2 TODOs.
- split builder.expr into two functions so we don't need
defer, which makes panic dumps harder to read.
R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/13257045
Previously, if the result was not wanted, the received
(value, ok) tuple had no type for 'value'.
Now it is always set to the channel's element type.
Also: set the position on such receive instructions to that of
the = or := token, and document it.
+ (indirect) test via pointer analysis.
R=crawshaw, gri
CC=golang-dev
https://golang.org/cl/12956052
Map literals should use the same recursion logic as
struct/array/slice literals to apply an implicit &-operator to
the nested literals when a pointer is wanted.
+ test.
Also:
- ensure we set the source location for all Lookup and
MapUpdate instructions.
- remove obsolete address.object field.
R=gri, crawshaw
CC=golang-dev
https://golang.org/cl/12787048
Add support for logging commands for Mercurial and Subversion as well as the ability to create/log a repo at a certain revision.
- Exported Cmd.LogCmd
- Exported Cmd.CreateAtRev
- Exported Cmd.Log
- Exported Cmd.LogAtRev
R=adg
CC=golang-dev
https://golang.org/cl/13060044
App Engine needs the whitelist file and it's cleaner if it's
in its own package where it can be imported directly, without
pushing composite.go through a pile of sed.
R=dsymonds, r
CC=golang-dev
https://golang.org/cl/12746045
It is needed after all, as I discovered in the pointer analysis.
(ssa needs more API test coverage.)
Also:
- sanity: remove debugging cruft
- promote: don't redundantly include the function's
own name in its Synthetic string.
- print: IntuitiveMethodSet utility fixes a bug in the
printing logic (for interface types, mset(*T) is empty).
The function is also used by the Oracle.
R=crawshaw
CC=golang-dev
https://golang.org/cl/13116043
&x.f, &x[0], x[i:j], &*x all must panic if x==nil.
The first three are already addressed by the semantics of
FieldAddr, IndexAddr, Slice; updated docs to reflect this.
The final case requires generation of an additional dynamic check.
See golang.org/s/go12nil for details.
Tested on $GOROOT/test/nilptr2.go (with patch from CL 13108043)
Also: remove a TODO where a no-op will do.
R=gri, crawshaw
CC=golang-dev, rsc
https://golang.org/cl/13064044
Fix bug: the Signature for an interface method wrapper
erroneously had a non-nil receiver.
Function:
- Set Pkg field non-nil even for wrappers.
It is equal to that of the wrapped function.
Only wrappers of error.Error
(and its embeddings in other interfaces) may have nil.
Sanity checker now asserts this.
- FullName() now uses .Synthetic field to discriminate
synthetic methods, not Pkg==nil.
- Fullname() uses new relType() utility to print receiver type
name unqualified if it belongs to the same package.
(Alloc.String also uses relType utility.)
CallCommon:
- Description(): fix switch logic broken when we
eliminated the Recv field.
- better docs.
R=david.crawshaw, crawshaw, gri
CC=golang-dev
https://golang.org/cl/13057043
Package.CreateTestMainFunction() creates a function called
main and adds it to the package. This function calls
testing.Main in the Go library with the appropriate arguments:
slices of test, benchmark and example functions from the
package.
Tested by running the interpreter on the following tests:
- unicode/script_test.go
- unicode/digit_test.go
- hash/crc32/crc32_test.go
- path/path_test.go
It's also covered indirectly via the pointer analysis.
R=crawshaw, gri
CC=golang-dev
https://golang.org/cl/12814046
The test would nuke the entire contents of os.TempDir on completion.
This change corrects the code to use ioutil.TempDir.
R=r, adg
CC=golang-dev
https://golang.org/cl/12796045
go/vcs exposes cmd/go/vcs.go from the `go get` command.
- Exported global variables `Verbose` and `ShowCmd` to replace `buildV` and `buildX` from cmd/go/main.go.
- Moved environment building code (envForDir, mergeEnvLists)from cmd/go/main.go to env.go
- Exported Cmd and its methods: Create, Download, Ping, TagSync, and Tags
- Exported ByCmd and FromDir functions for constructing Cmd
- Exported TagCmd
- Exported RepoRoot
- Exported RepoRootForImport* functions for constructing RepoRoot
R=golang-dev, adg, cmang, bradfitz
CC=golang-dev
https://golang.org/cl/12058054
- cleaned up surrounding code
- adjusted error message positions for too few/many argument errors
- added more conversion tests
- added all tests under test/ken to std tests
R=adonovan, r
TBR=adonovan
CC=golang-dev
https://golang.org/cl/12711043
- support Info.Scopes mapping that maps ast.Nodes
to the respective *Scope
- remove old node link from *Scope
- added corresponding API test
Also: re-enable debug mode (the faster version was
only important for the go api tool, which has its
own version now).
R=adonovan, r
CC=golang-dev
https://golang.org/cl/12552047
Provide fewer guarantees regarding the collected result
type information in types.Info if there are type errors.
Specifically, don't record nil objects in the Objects map
in case of a declaration error; instead, simply omit them.
R=adonovan
TBR=adonovan
CC=golang-dev
https://golang.org/cl/12553043
If a method cannot type check, we end up with the interface variable
m to hold <*Func, nil>. Don't put that in the map because it defeats
the usual != nil check.
R=gri, dsymonds
CC=golang-dev
https://golang.org/cl/12506043
Was broken by CL 12378043.
- factored out some error checking code
- adjusted error positions
R=adonovan
TBR=adonovan
CC=golang-dev
https://golang.org/cl/12401043
They use stuff in syscall that doesn't exist on Windows, and this test does not
parse build tags (not that we make that easy) to automatically skip them.
R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/12453043
TBR: gri
I cannot create an issue on the tracker for some reason, so here it is:
go vet contains this snippet:
if types.IsAssignableTo(typ, errorType) || types.IsAssignableTo(typ, stringerType) {
It's getting the wrong answer: It claims
interface {
f()
}
or even
interface {
f() float64
}
matches the Error and Stringer interfaces. Both of them. This causes a test failure:
$ go test code.google.com/p/go.tools/cmd/vet
BUG: errchk: testdata/print.go:124: missing expected error: '"for printf verb %s of wrong type"'
$
This worked until very recently.
R=gri
CC=golang-dev
https://golang.org/cl/12398043