-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: include files and lines in import-cycle errors #12871
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
Comments
I think it's a fine idea, but the cycle can't be anywhere in foo: it has to be an import statement, and import statements have to be near the start of a file. |
Yes, but it could be in any file. |
Also, I don't understand why it prints the message and cycle twice. |
It be nice to have Instead of
I'd propose
I can implement this if you guys like the idea. |
Sure, though I would keep it on line ("imports github.com/pressly/api at cmd/main.go:12"). It's too late for Go 1.8 but please send a CL for Go 1.9. |
No activity. Closing. |
The error can be more helpful if it pinpoints the files/lines that cause the cycle.
Example:
That could be anywhere in foo.
The text was updated successfully, but these errors were encountered: