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

Implement version resolution #234

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Implement version resolution #234

wants to merge 2 commits into from

Conversation

mara-schulke
Copy link
Contributor

@mara-schulke mara-schulke commented Apr 22, 2024

Current State

As of right now buffrs users can only pin their dependencies which yields to a limited flexibility when using, especially in a fast moving environment.

Implementation Plan

In order to ship a proper version resolution for buffrs we need to rethink a couple of fundamental concept such as how we think about versioning, repositories and registries (see #235).

Once this is accomplished (and potentially already shipped) we can feed the version information from artifactory into pubgrub or resolvo to resolve a set of dependencies fulfilling all constraints.

Each pubgrub run should produce a new lockfile that is then written to disk (when doing a full resolution only from the lockfile, there should be no change!).

Also offline compatibility is key: If the cache contains all packages that are listed in the lockfile and the lockfile contains enough information to resolve the whole tree no network request should be made this is important for our nix integration and existing user workflows.

Things to watch out for

  • It will not be possible to resolve multiple versions of the same package (this is due to limitations of how protoc works when compiling)
  • It is desirable to use the existing caching implementation and lockfile implementation before doing any network requests. See the code in this PR for reference.
  • It is desirable to only partially replace the lockfile if dependencies have been added.
  • We should think about adding the project itself (read: the buffrs project containing the Proto.toml) into the lockfile to unify the top-level dependency graph with sub dependency graphs.

@mara-schulke mara-schulke added datamodel Changes related to the Datamodel component::cli Everything related to the buffrs cli priority::high Urgent change or idea, please review quickly complexity::high Issues or ideas that are highly complex. require discussion and may affect backwards compatibility type::epic An epic change. This is going to make a big difference to buffrs as a product. labels Apr 22, 2024
@mara-schulke mara-schulke added this to the Stabilization milestone Apr 22, 2024
@mara-schulke mara-schulke self-assigned this Apr 22, 2024
@mara-schulke mara-schulke marked this pull request as draft April 22, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity::high Issues or ideas that are highly complex. require discussion and may affect backwards compatibility component::cli Everything related to the buffrs cli datamodel Changes related to the Datamodel priority::high Urgent change or idea, please review quickly type::epic An epic change. This is going to make a big difference to buffrs as a product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant