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

If local Go is different version than Go used to compile depth, tree.Resolve fails with an unhelpful error message #15

Open
elldritch opened this issue Mar 9, 2018 · 0 comments

Comments

@elldritch
Copy link

Hi there!

We've been using depth as a library as a part of https://github.com/fossas/fossa-cli to power our Go dependency discovery. We recently ran into an interesting bug where using a copy of depth compiled with a different (newer?) version of Go than the local Go caused tree.Resolve to fail with cryptic errors like could not resolve package: fmt or could not resolve package: bytes. My suspicion is that this is related to depth's usage of go/build, and some weirdness is going on with importing standard library packages when the Go version changes. See fossas/fossa-cli#63 for our downstream tracking issue.

We're working around this issue by switching to go list parsing instead, but I wonder if this can be resolved within depth itself (maybe by special-casing the standard library packages?). If not, it may be possible to at least give a less cryptic error message by detecting when a resolution error occurs on a known standard library package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant