Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: error points to nonexistent file #36437

Open
rsc opened this issue Jan 7, 2020 · 3 comments
Open

cmd/compile: error points to nonexistent file #36437

rsc opened this issue Jan 7, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Jan 7, 2020

The x.go:0: here does not make much sense given that x.go does not exist.
It seems like it should be omitted, no?

$ go tool compile x.go
x.go:0: open x.go: no such file or directory

/cc @griesemer

@rsc rsc added the NeedsFix label Jan 7, 2020
@rsc rsc added this to the Go1.15 milestone Jan 7, 2020
@griesemer griesemer self-assigned this Jan 7, 2020
@griesemer

This comment has been minimized.

Copy link
Contributor

@griesemer griesemer commented Jan 7, 2020

Agreed.

@tandr

This comment has been minimized.

Copy link

@tandr tandr commented Jan 7, 2020

Curious - how many scripts/tools that parse compiler output and rely on the line start being file:linenumber will need to be modified?
There is no way to get structured output from the compiler (say, for example --json, that would produce all errors and warnings in a nicely parseable structured format). So tools are relying on compiler output parsing.

@beoran

This comment has been minimized.

Copy link

@beoran beoran commented Jan 8, 2020

FWIW, Geany has no problems with either the current behavior or the proposed x.go: open x.go: no such file or directory message. There's no file to open anyway. So I guess most other editors will be ok if they have smart enough compiler output parsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.