-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ability to resolve dependencies "in the past" #212
Comments
Yes I think that's quite doable, I'll need to add a parameter option to both the resolve service and the versions list endpoint on the packages service, will take a look at that either tomorrow or next week. Also I think you're one of the first teams using this service, so good to know how you find it or any other feedback you have. |
I've added the Just need to do the same in the resolve service now. |
Thanks Andrew, you're awesome ;-)
We are currently exploring the possibilities offered by ecosyste.ms and so far, we are happy with what you've done! :-) That said, the main difficulties we have relate to the lack of "documentation": it is not always easy to understand exactly what each endpoint is providing, and what's the content of each field returned by the API. I guess it's a matter of habit :-) So far, in case of doubt, I look at the code (but I'm not familiar with Ruby, and it's good that I've some experience with Django to understand how Rails is structured ^^) It is also quite difficult to grasp the "implicit relational model" behind these endpoints, especially when working with GitHub Actions, since Actions are packages (i.e., they come from the "package" endpoints), but most of the data about these packages can be obtained from the "repo" endpoints (e.g., releases of Actions are not "package releases", but "repository tags"; dependencies for these Actions can be obtained from the "repo/manifest" endpoint, and not from the "package dependencies" endpoint, etc.). I guess it's quite specific to Actions since they do not really have explicit releases, nor explicit dependencies ;-) But so far, we manage to get the data we need :) Some other minor points we noticed:
|
I've deployed a first pass at this: ea6cbfd the before parameter should be a standard datetime format i.e. |
Thanks! When I try on https://resolve.ecosyste.ms/ with one of my package (namely Considering the "resolve" endpoint, in complement to the name of a package, would it be possible to specify the version of that package whose dependencies should be resolved? |
@AlexandreDecan pushed a fix for the caching issue and added the api doc file. |
@AlexandreDecan I've deployed an experimental, optional |
The documentation (in the API page) for I'm waiting for the job to complete, but looking at the code, I'm wondering whether transitive dependencies comply with the |
@AlexandreDecan sorry that's a copy-pasta typo, fixed now. I believe all transitive dependencies should honor before,
I'll check the sorting tomorrow, this project is a bit of a "best-case" right now as a generic resolver, it doesn't encode the exact resolution strategy of each package manager, but definitely can improve in places. |
Would it be easy for you to add support for dependency constraint in the "version" field (or through another field)? |
Hi @andrew, I used the 'resolve' API to resolve the dependencies of an npm package, but I encountered an error in the result. The error message is as follows: error@#<PubGrub::SolveFailure: "Could not find compatible versions\n\nBecause @actions/github >= 5.0.1 depends on @octokit/plugin-rest-endpoint-methods >= 5.13.0, < 6.0.0\n and no versions satisfy @octokit/plugin-rest-endpoint-methods >= 5.13.0, < 6.0.0,\n @actions/github >= 5.0.1 is forbidden.\nSo, because root depends on @actions/github = 5.0.3,\n version solving has failed.">'. https://resolve.ecosyste.ms/resolve?registry=npmjs.org&package_name=@actions/github&version=5.0.3&before=2022-09-22%2008:04:01+00:00 More examples : |
Hello @andrew,
This endpoint is really useful to resolve dependencies based on the current situation of a package (i.e., based on the releases that are currently available). Would it be possible to add a "date" field to simulate dependency resolution for a specific date? To some extent, this means only considering releases of packages that were available up to the given date.
Consider the following example:
>=1.0.0
;Currently, the endpoint would list "[email protected]" as a resolved dependency (as
1.0.1
is the latest/highest release satisfying the constraint). What we would like to do is, for example, to know what were the dependencies of A on 23-06-01. In this specific example, the endpoint would return "[email protected]" since1.0.0
is the highest/latest release of B complying with given dependency constraint at that specific point in time (because1.0.1
was not yet released at that date). So, with a very naive approach, given adate
field, the process to resolve dependencies (and transitive dependencies) would consist of applying the current algorithm but only taking into account releases whose release date is<= date
.(Adding @HassanOnsori since he's the one working on this currently ;-))
Funding
The text was updated successfully, but these errors were encountered: