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
Add revision support to versioning #10
Merged
Merged
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
In order to make sure that all revisions are installable in terms of the limits established by limits.json, we max out the revision section to INT_MAX so that all versions up to that upper limit revision are installable and avoid having to re-ship a new limits.json file whenever a new revision comes out.
It could happen that the update might not be installable because of the host version limit in the user's machine. Since install() is the method that fails, and uninstall() is not bound by limits, we run the former first to make sure it succeeds before removing anything.
Turns out that installing the new version first then uninstalling the old version, when the update is simply a revision, causes the registration file for the packages in that version to vanish due to the fact that the uninstallation removes the registration file of that package name. It can also cause installed files to be simply replaced then erased, leaving a broken installation. So we made Component.CanInstall() public in order to allow checking before uninstalling.
Removed the logic to remove a previous version of a component upon the installation of a newer version. In order to make it work, one would have to: 1. Remove reverse dependencies of older version to be removed. 2. Make sure to install the new versions of these reverse dependencies. Update will do the trick for now.
Test Results82 tests +21 82 ✅ +21 0s ⏱️ ±0s Results for commit 308a13e. ± Comparison against base commit e16259b. This pull request removes 19 and adds 40 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
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 PR adds revision support to component versioning. This will allow the release of updates when the upstream .NET version of a component does not change.
How it works
Revision works by appending a
+<number>
to the end of the version string of a component, e.g.Since the
key
is a unique parameter, it should also be updated to include the revision to avoid any collisions when merging local and remote manifests.Any dependency key strings also need updating when the key of a dependent component changes.
Ordering
Revision is an optional parameter, therefore a version
8.0.3
has a revision ofnull
. Subsequently, any+<number>
appended to the end of a version string changes the version to have a revision of<number>
.Null revisions take precedence in ordering, such as: