[vcpkg] Implement versions db generator#13777
Conversation
|
I'm not sure whether to check in the db files, there are too many of them. Also, it seems like I forgot to clean up some unrelated code. |
ras0219-msft
left a comment
There was a problem hiding this comment.
Thanks for opening this PR!
I haven't finished reading more deeply into the algorithm, but here are some more trivial comments.
…et-versions-from-history
…et-versions-from-history
* Introduce FeatureFlagSettings struct to more easily access feature flags throughout the program * To avoid users accidentally starting to write "version" instead of "version-string" in their manifests, vcpkg explicitly detects and prevents usage of ports with schemes other than "String" * Drive-by fix of copiable SourceControlFileLocation and an exposed use-after-move bug This code is largely extracted from PR microsoft#13777 Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
ras0219
left a comment
There was a problem hiding this comment.
I've lightly reviewed the changes to port history since that's an x- command.
#14079) * [vcpkg] Add `versions` feature flag and version field manifest parsing * Introduce FeatureFlagSettings struct to more easily access feature flags throughout the program * To avoid users accidentally starting to write "version" instead of "version-string" in their manifests, vcpkg explicitly detects and prevents usage of ports with schemes other than "String" * Drive-by fix of copiable SourceControlFileLocation and an exposed use-after-move bug This code is largely extracted from PR #13777 Co-authored-by: Victor Romero <romerosanchezv@gmail.com> * [vcpkg] Address CR Comments. Fix test crash on Linux. Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
strega-nil
left a comment
There was a problem hiding this comment.
I haven't looked at the rest of the code, but here are the things I see that should be corrected with the python.
…et-versions-from-history
…to versioning/get-versions-from-history
strega-nil
left a comment
There was a problem hiding this comment.
Thanks for the changes victor!
[vcpkg] Implement versions db generator (microsoft#13777)
microsoft#14079) * [vcpkg] Add `versions` feature flag and version field manifest parsing * Introduce FeatureFlagSettings struct to more easily access feature flags throughout the program * To avoid users accidentally starting to write "version" instead of "version-string" in their manifests, vcpkg explicitly detects and prevents usage of ports with schemes other than "String" * Drive-by fix of copiable SourceControlFileLocation and an exposed use-after-move bug This code is largely extracted from PR microsoft#13777 Co-authored-by: Victor Romero <romerosanchezv@gmail.com> * [vcpkg] Address CR Comments. Fix test crash on Linux. Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
* [vcpkg] Add script to generate ports versions history * [vcpkg] Fix formatting * Fetch port versions from commit ID * Use global --x-json switch * Use --no-checkout when cloning secondary instance * Clone from local repository instead of from GitHub * Use CmdLineBuilder to build git commands * Use CmdLineBuilder and reduce repeated code * Fetch version at baseline and code cleanup * Guess version scheme from old CONTROL files * Rename version db generator script * Simplify x-history json output * Use CONTROL/manifest parsers on x-history * Use git-tree instaed of commit-id * Remove 'ports' field from root object * Clean up code * More code cleanup * Improve port version detection * Improve generator logging * Do not ignore parsing errors in CONTROL files * PR review comments in Python script * Fix subprocess.run() calls * Make `canonicalize()` return error instead of terminating * [vcpkg] Add tests for new test_parse_control_file paths * Remove unnecessary std::move() calls * Fix formatting * Python formatting Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Reduced scope of this PR to only generating version files from our Git history
x-historyto allow JSON output and add more version related informationx-historyactually parseCONTROLandvcpkg.jsonfiles to fix several edge cases