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

Detect go binary packages #3894

Merged
merged 7 commits into from
Oct 19, 2024
Merged

Conversation

pombredanne
Copy link
Member

@pombredanne pombredanne commented Aug 15, 2024

This PR add support to scan Go binaries for their embedded packages. This is the ScanCode side.

The Go inspector PR is at

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Philippe Ombredanne <[email protected]>
@pombredanne pombredanne force-pushed the detect-go-binary-packages branch from 434322f to 038eb03 Compare September 5, 2024 19:09
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
@pombredanne
Copy link
Member Author

@AyanSinhaMahapatra ready for your review

Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @pombredanne
Can be merged with a minor nit resolved.

tests/packagedcode/test_plugin_package.py Outdated Show resolved Hide resolved
@AyanSinhaMahapatra
Copy link
Member

AyanSinhaMahapatra commented Sep 6, 2024

I'm getting a:

INFO: pip is looking at multiple versions of scancode-toolkit[packages,testing] to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install scancode-toolkit[packages,testing]==32.2.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    scancode-toolkit[packages,testing] 32.2.1 depends on go-inspector>0.3.0; platform_system == "Linux" and extra == "packages"
    The user requested (constraint) go-inspector==0.3.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

On running ./configure --clean && ./configure --dev not sure why this is not happening in the CI 🤔

Edit: seems to be a fluke, not happening anymore

@AyanSinhaMahapatra
Copy link
Member

I think https://github.com/aboutcode-org/go-inspector/blob/main/src/go_inspector/binary.py#L482 should be in packagedcode here? Or do we need #3761 to be merged before that?

Signed-off-by: Philippe Ombredanne <[email protected]>

Co-authored-by: Ayan Sinha Mahapatra <[email protected]>
@AyanSinhaMahapatra
Copy link
Member

Thanks @pombredanne , merging!

@AyanSinhaMahapatra AyanSinhaMahapatra merged commit 9b3cf12 into develop Oct 19, 2024
33 checks passed
@AyanSinhaMahapatra AyanSinhaMahapatra deleted the detect-go-binary-packages branch October 19, 2024 10:38
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

Successfully merging this pull request may close these issues.

2 participants