-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Versioning rework #349
Merged
Merged
Versioning rework #349
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resolvers now provides a `versions_for(Dependency)` that returns the list of available versions (releases or refs, depending on the requirements). Handling of repository metadata is being moved inside the resolver (Git).
Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org>
straight-shoota
approved these changes
Apr 14, 2020
bcardiff
approved these changes
Apr 14, 2020
Closed
taylor
pushed a commit
to vulk/shards
that referenced
this pull request
Aug 11, 2020
f-fr
pushed a commit
to f-fr/shards
that referenced
this pull request
Jan 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This ended up being a not so small PR and I have more changes coming, but I prefer to split here now that at least the tests are passing 😅
This is mostly a refactor, although I fixed some cases of locks with commits that were either not working or working not totally on purpose.
For the user, there are two (non breaking) visible changes:
shard_name.version
file for each shard within thelib
directory. This replaces the.sha1
file that was generated for shards not coming from a release version.shard.lock
file now containsversion
for both releases and git refs. For versions it's the same a before, but for git refs the version is stores something like:0.9.0+git.commit.ed686ad3015f48f8b22cf4fbec80e8c8088ef44b
Internally there are some refactors:
commit
orversion
.Resolver
class changed slightly:versions_for(Dependency)
now returns the list of versions (releases or refs) matching the dependency requirement.spec(version)
works only with version strings, no more refs. (refs are transformed into versions first by calling the previous method)install
is performed by version also, no more refs.MolinilloSolver
is now pretty much agnostic to git refs. There is still a minor reference to git metadata that I plan to remove soon. Understanding of whether a version matches a requirement is delegated to the resolver.All these changes (and the ones coming) will make it easier soon to add or fix features:
shards outdated
#325)