Fix two unrelated version issues #5719
Merged
+57
−5
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.
Fixes #4928
Fixes providing "1" for the version when the version is actually "1.0" and the like (there is probably an issue filed but I didn't find it after a quick search).
Issues
Due to SQLite helpfully not being picky about data types, the packages table in the v2 index was using INT64 for every column, when in reality they should mostly by strings (TEXT). When the version was parsable as a number, it would drop unnecessary portions (trailing 0s).
New code in the v2 index and the composite package changes were using string comparison instead of
Version
, requiring an exact string match rather thanVersion
equality.Changes
Use the data type that we already had set up rather than always INT64. This will require a service update to actually fix anything (but doesn't require a client update).
Use
Version
comparisons rather than string in the v2 index and composite package version selection.Validation
Added new tests and confirmed via manual usage.
Microsoft Reviewers: Open in CodeFlow