Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: "dot import" causes confusing error in 1.6 #14683
@davecheney and I have already had a bit of a back and forth on this already on golang-nuts (I'll avoid actually requiring anyone to read this, but for attribution sake it's here). It seems if I replace the dot import in the test file (
with a full import:
It fixes it. However the dot import did (and still does) work in 1.5.3.
Dave thinks the dot import should be a compiler error. I agree. However I'm a bit confused as to the state of relative imports in go. I held they were a deliberate omission, but there's mention of limited support which I don't know the details of. And again, this does work in 1.5.3, so unless I screwed something else up (repeatedly, on different machines) this is a regression.
For the record, I don't generally like relative imports, but saw the dot import in tests at a talk and thought that it seemed like a nice exception. A way for a
We actually have tests in
@quentinmit it works when you use
The error message is now different at Go tip (as of 992ce90):
But still not critical.