ci: workaround RUSTFLAGS leaking into cargo-make/cargo-wdk builds#51
Closed
wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
Closed
ci: workaround RUSTFLAGS leaking into cargo-make/cargo-wdk builds#51wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
…t builds Unset RUSTFLAGS for cargo-make and cargo-wdk steps in build.yaml to prevent -D warnings from leaking into rust-script compilation of wdk-build. This is a temporary workaround. The proper fix is in microsoft/windows-drivers-rs#629 which rewrites path deps to version-only deps in load_wdk_build_makefile() for registry consumers. Root cause: wdk-build = { path = '.' } in rust-driver-makefile.toml makes wdk-build a path dependency even when loaded from the registry cache via symlink. Cargo does not apply --cap-lints allow to path deps, so RUSTFLAGS leaks through. Tracked in ADO Bug #5396440.
Collaborator
Author
|
Closing in favor of bundling this workaround into #49. |
This file contains hidden or 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
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.
Workaround: RUSTFLAGS leaking into cargo-make/cargo-wdk rust-script builds
Temporary workaround for the RUSTFLAGS leak issue tracked in:
Problem
RUSTFLAGS=-D warningsinbuild.yamlleaks intorust-scriptcompilation ofwdk-buildduringcargo makeandcargo wdksteps. This is becausewdk-buildis loaded as a path dependency (via symlink to registry cache), which bypasses cargo's--cap-lints allow.Workaround
Unset
RUSTFLAGSforcargo make,cargo wdk install, andcargo wdk buildsteps. The normalcargo buildstep retainsRUSTFLAGSsince it resolves wdk-build as a proper registry dependency.When to remove
Once microsoft/windows-drivers-rs#629 is merged and a new
wdk-buildis published, this workaround can be removed and the samples repo can update itswdk-builddependency.