-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[vcpkg] Implement versions db generator #13777
[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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-history
to allow JSON output and add more version related informationx-history
actually parseCONTROL
andvcpkg.json
files to fix several edge cases