deps: Replace vergen with a new support crate#2905
deps: Replace vergen with a new support crate#2905smalis-msft wants to merge 4 commits intomicrosoft:mainfrom
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
There was a problem hiding this comment.
Pull request overview
This PR removes the vergen dependency and replaces it with a small in-repo build-script helper crate that emits git SHA/branch information via cargo:rustc-env, reducing transitive dependency footprint while preserving build metadata.
Changes:
- Add new
support/build_rs_git_infocrate to emitBUILD_GIT_SHA/BUILD_GIT_BRANCHusing thegitCLI. - Update OpenHCL crates’
build.rsand runtime code to use the new env var names instead ofVERGEN_*. - Remove
vergenfrom workspace dependencies and lockfile.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| support/build_rs_git_info/src/lib.rs | New helper implementation for invoking git and emitting build env vars. |
| support/build_rs_git_info/Cargo.toml | Defines the new support crate and its minimal dependencies. |
| openhcl/underhill_init/src/lib.rs | Switch runtime logging to BUILD_GIT_SHA / BUILD_GIT_BRANCH. |
| openhcl/underhill_init/build.rs | Use build_rs_git_info instead of vergen. |
| openhcl/underhill_init/Cargo.toml | Replace vergen build-dependency with build_rs_git_info. |
| openhcl/underhill_crash/src/lib.rs | Switch crash metadata to BUILD_GIT_SHA. |
| openhcl/underhill_crash/build.rs | Use build_rs_git_info instead of vergen. |
| openhcl/underhill_crash/Cargo.toml | Replace vergen build-dependency with build_rs_git_info. |
| openhcl/build_info/src/lib.rs | Switch BuildInfo fields to read BUILD_GIT_SHA / BUILD_GIT_BRANCH. |
| openhcl/build_info/build.rs | Use build_rs_git_info instead of vergen. |
| openhcl/build_info/Cargo.toml | Replace vergen build-dependency with build_rs_git_info. |
| Cargo.toml | Add build_rs_git_info workspace dep; remove vergen version. |
| Cargo.lock | Lockfile updates reflecting dependency removal/addition. |
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
You can also share your feedback on Copilot code review. Take the survey.
The vergen crate, and especially its new version 9, pulls in a lot of dependencies for the relatively small pieces of it we use. Replace it with a new home-grown crate that has no dependencies beyond anyhow and just does what we need.