Comments now, fixes in the morning. http://codereview.appspot.com/5018044/diff/5001/src/cmd/goinstall/main.go File src/cmd/goinstall/main.go (right): http://codereview.appspot.com/5018044/diff/5001/src/cmd/goinstall/main.go#newcode240 src/cmd/goinstall/main.go:240: terrorf(tree, "%s: found ...
13 years, 5 months ago
(2011-09-15 01:31:11 UTC)
#3
Comments now, fixes in the morning.
http://codereview.appspot.com/5018044/diff/5001/src/cmd/goinstall/main.go
File src/cmd/goinstall/main.go (right):
http://codereview.appspot.com/5018044/diff/5001/src/cmd/goinstall/main.go#new...
src/cmd/goinstall/main.go:240: terrorf(tree, "%s: found package %s in %s, want
package %s", pkg, dirInfo.Package, dir, name)
On 2011/09/15 01:07:05, adg wrote:
> This is an interesting new restriction? Why?
There's no allowMain flag on ScanDir anymore.
The real point of this check is to preserve the
existing behavior of rejecting package main
when the parent != "".
I had not intended to enforce dir = package.
Will fix to just reject main.
http://codereview.appspot.com/5018044/diff/5001/src/pkg/go/build/dir.go
File src/pkg/go/build/dir.go (right):
http://codereview.appspot.com/5018044/diff/5001/src/pkg/go/build/dir.go#newco...
src/pkg/go/build/dir.go:115: return d.Package == "main"
On 2011/09/15 01:07:05, adg wrote:
> How does this interact with gotest and commands?
It's not a change.
The only change is the addition of the // TODO.
I understand that we need some way to identify commands.
It might be that the current test is fine. I do want to
think a bit more about it though, so I flagged it.
Issue 5018044: code review 5018044: go/build: handle cgo, //build comments
(Closed)
Created 13 years, 5 months ago by rsc
Modified 13 years, 5 months ago
Reviewers:
Base URL:
Comments: 9