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

Error when multiple go packages exist in a folder #330

Open
iplay88keys opened this issue Aug 9, 2017 · 2 comments
Open

Error when multiple go packages exist in a folder #330

iplay88keys opened this issue Aug 9, 2017 · 2 comments

Comments

@iplay88keys
Copy link

We see an issue when running LicenseFinder against our codebase as we are pulling in a dependency that contains multiple go files with different packages in the same folder.

For reproducing the bug, here's the repo we are pulling in: https://github.com/docker/libcompose.
The folder that causes the error is: hack.

The error we see is:

$ license_finder report
can't load package: package ./src/github.com/docker/libcompose/hack: found packages main (inline_schema.go) and config (schema_template.go)`
/Users/<username>/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/license_finder-3.0.2/lib/license_finder/package_managers/go_workspace.rb:77:in `block in go_list': go list failed (RuntimeError)
@kdykeman
Copy link
Contributor

I'm able to reproduce this as of commit 59e2330

@kdykeman
Copy link
Contributor

Digging a bit, it seems that Golang code shouldn't have multiple packages in a single directory. I opened issue #499 in the libcompose repo. I'll look around for something that might allow LF to handle this condition a bit more gracefully.

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

No branches or pull requests

3 participants