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

RFC: Introduce idea of embedded package #177

Open
Tracked by #272
JonoYang opened this issue Aug 29, 2023 · 2 comments
Open
Tracked by #272

RFC: Introduce idea of embedded package #177

JonoYang opened this issue Aug 29, 2023 · 2 comments

Comments

@JonoYang
Copy link
Member

Many times, we encounter packages within other packages. For example, there are maven JARs that contain JARs, as is the case with Spring Boot or other uber JARs. We currently do not have the concept of relating packages like this, where a group of packages are contained within another package. This relation would help us in the cases where we are matching an uber JAR package and we can have a list of all the packages contained within that package and return with the match not only the uber JAR package data, but also the package data for all the other embedded packages.

This will probably be a new foreign key on Packages with the name embedded_packages.

@JonoYang
Copy link
Member Author

An idea about how to populate the embedded package field for a Package would be to do it during package indexing time.

After we fingerprint the codebase for the package we want to index, we check to see if the directory fingerprints we just computed match against other directory fingerprints from other packages, excluding different versions of the package we are currently indexing. If there is a match, then we can say that this package that we're indexing is embedded in another.

This step can also show us what packages are embedded within the package we're currently indexing.

@armijnhemel
Copy link

Related: #163

JonoYang added a commit that referenced this issue Oct 27, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Oct 27, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Oct 27, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Oct 27, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Nov 11, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Nov 11, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Nov 11, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Nov 11, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Nov 11, 2023
    * Update expected test result

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Nov 14, 2023
    * This will group Packages with the same content
    * The best package match will be the primary package of the content_set
    * when someone does a lookup on a sha1, they can find the content set and then find the best package for that sha1

Signed-off-by: Jono Yang <jyang@nexb.com>
@pombredanne pombredanne changed the title Introduce idea of embedded package RFC: Introduce idea of embedded package Jan 27, 2024
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

2 participants