On Tue, Feb 26, 2013 at 8:03 AM, <dave@cheney.net> wrote:
> LGTM assuming it fixes
>
http://build.golang.org/log/**c6359bba20cfd944671ffab8c0fbf8**f8264dd589<http...
yes, it should fix it.
> https://codereview.appspot.**com/7393063/diff/6001/src/cmd/**
>
go/run.go#newcode74<https://codereview.appspot.com/7393063/diff/6001/src/cmd/go/run.go#newcode74>
> src/cmd/go/run.go:74: fatalf("go run: no suitable source file (check
> build tags or filename?)")
> Not sure about the parethetised suggestions, maybe leave them out.
>
i was thinking that the possible confusion when the user get this:
$ go run some.go
go run: no suitable source file
$ go run _another.go
no Go source files in /Users/minux//go/go2.hg/src
(if the paren. hint is acceptable, we probably could also add a hint for
the 2nd case)
it seems the 1st case will only happen if cgo is disabled while the files
use cgo,
so perhaps we can check for the problem explicitly.
Personally I don't want to see people relying on go run too much. Its
job is to run simple one shot source files, and people already expect
too much from it now.
+ adg to see if he can offer a suggestion on the error message
On Tue, Feb 26, 2013 at 11:10 AM, minux <minux.ma@gmail.com> wrote:
>
> On Tue, Feb 26, 2013 at 8:03 AM, <dave@cheney.net> wrote:
>>
>> LGTM assuming it fixes
>> http://build.golang.org/log/c6359bba20cfd944671ffab8c0fbf8f8264dd589
>
> yes, it should fix it.
>>
>>
>> https://codereview.appspot.com/7393063/diff/6001/src/cmd/go/run.go#newcode74
>> src/cmd/go/run.go:74: fatalf("go run: no suitable source file (check
>> build tags or filename?)")
>> Not sure about the parethetised suggestions, maybe leave them out.
>
> i was thinking that the possible confusion when the user get this:
> $ go run some.go
> go run: no suitable source file
> $ go run _another.go
> no Go source files in /Users/minux//go/go2.hg/src
>
> (if the paren. hint is acceptable, we probably could also add a hint for the
> 2nd case)
>
> it seems the 1st case will only happen if cgo is disabled while the files
> use cgo,
> so perhaps we can check for the problem explicitly.
On Tue, Feb 26, 2013 at 8:16 AM, Dave Cheney <dave@cheney.net> wrote:
> Personally I don't want to see people relying on go run too much. Its
> job is to run simple one shot source files, and people already expect
> too much from it now.
>
I agree. If andrew also agrees with eliminating the hint, i will do so.
Issue 7393063: code review 7393063: cmd/go: fix "go run" cgo source when cgo is disabled
(Closed)
Created 12 years ago by minux1
Modified 12 years ago
Reviewers:
Base URL:
Comments: 2