Giter Club home page Giter Club logo

Comments (7)

sschuberth avatar sschuberth commented on May 18, 2024 1

As a side note, Software Heritage's SWHIDs also are basically just gitoids, and having compatibility here would be great.

from deps.dev.

sschuberth avatar sschuberth commented on May 18, 2024 1

As I understood this feature request, it's about matching source code files (e.g. .java files).

Right, but I have a hunch that this request was made out of the same misunderstanding of the API as I had: In @edwarnicke's view source code files seem to be artifacts (and leaves of the dependency tree), and the API sounded as if hashing of such "artifact" already is supported, and just gitoids would need to be added as an alternative hash algorithm.

Anyway, let's see what @edwarnicke responds 😀

PS: Personally, I don't share the view that source code files are the leaves of dependency trees. They're just the building blocks the leave artifacts are made of.

from deps.dev.

edwarnicke avatar edwarnicke commented on May 18, 2024

Oh... also... there is a URI scheme for gitoids if that proves helpful.

from deps.dev.

sarnesjo avatar sarnesjo commented on May 18, 2024

Hi @edwarnicke! If I've understood your feature request correctly, you want to query by a hash of a source code file and get a list of matching package versions. If so, I agree that would be neat, but it's not something we can currently support (regardless of whether the hash is expressed as in the current Query endpoint or using a gitoid). For the most part, we don't have a reliable link between a package version and the repo commit it was built from. The exceptions are Go (where the repo is the distribution format) and the small-but-growing number of npm package versions for which SLSA provenance attestations are available. We are working on expanding our support for that, however, so hopefully this will eventually be a feature we could support.

from deps.dev.

sschuberth avatar sschuberth commented on May 18, 2024

you want to query by a hash of a source code file and get a list of matching package versions. If so, I agree that would be neat, but it's not something we can currently support

The last sentence confused me as the docs of https://docs.deps.dev/api/v3alpha/#query sounded as if that already was supported. But I guess the term "content hash" refers to something else than hashes of files (no matter by which algorithm). On the other hand, further docs say "hashes are matched against multiple artifacts that comprise package versions, and any given artifact may appear in many package versions", which again does sound as if "artifacts" were files.

@sarnesjo could you maybe clarify what the supported content / artifact hashes are? Like, in the case of maven, would it be the hash of the binary / source JAR?

from deps.dev.

sarnesjo avatar sarnesjo commented on May 18, 2024

Right, that wording could be more clear–I'll update the docs. What it should say is "hashes are matched against multiple release artifacts that comprise package versions". The exact meaning of this varies from system to system. For Maven, yes, it's the various .jar (and .war, etc) files uploaded to one of the Maven repositories that we track.

As I understood this feature request, it's about matching source code files (e.g. .java files).

from deps.dev.

Matthiasvanderhallen avatar Matthiasvanderhallen commented on May 18, 2024

For java, besides the .jar and .war files on the one hand, and the .java source code files on the other, there's also the compiled .class files that one could hash and query. I imagine being able to query on the level of .class files would be useful when encountering fat jars?

from deps.dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.