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: bad error for very short malformed package file #14270

Closed
rsc opened this issue Feb 9, 2016 · 3 comments
Closed

cmd/compile: bad error for very short malformed package file #14270

rsc opened this issue Feb 9, 2016 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 9, 2016

I'm redoing the package file format and code, and that work should fix this.

Noticed while debugging a cmd/go issue:

$ echo package p >p.go
$ echo 'import _ "./q"' >>p.go
$ echo broken >q.a
$ go tool compile p.go
p.go:2: import /tmp/q.a: not a package file
$

So far so good. But take the \n away from q.a:

$ echo -n broken >q.a
$ go tool compile p.go
compile: reading input: EOF
$ 

That's not useful: it doesn't even say what file is broken.

Like I said, the new package file code should fix this. This issue is a reminder to verify that. Please don't send CLs fixing the old code.

@rsc rsc self-assigned this Feb 9, 2016
@rsc rsc added this to the Go1.7Early milestone Feb 9, 2016
@bradfitz bradfitz modified the milestones: Go1.7, Go1.7Early May 5, 2016
@rsc rsc modified the milestones: Go1.8, Go1.7 May 17, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 11, 2016
@quentinmit
Copy link
Contributor

@rsc is this now fixed?

@rsc
Copy link
Contributor Author

rsc commented Oct 21, 2016

No, because the new packages haven't happened.

@rsc rsc modified the milestones: Go1.9Early, Go1.8 Oct 21, 2016
@bradfitz bradfitz assigned mdempsky and josharian and unassigned rsc May 3, 2017
@bradfitz bradfitz modified the milestones: Go1.9Maybe, Go1.9Early May 3, 2017
@josharian josharian removed their assignment May 3, 2017
@gopherbot
Copy link

CL https://golang.org/cl/45950 mentions this issue.

@golang golang locked and limited conversation to collaborators Jun 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants