deny.toml: Ban direct dependecies on r-efi outside the SDK crate [Rebase & FF] - #1745
Merged
makubacki merged 2 commits intoAug 14, 2026
Conversation
Contributor
✅ QEMU Validation PassedAll QEMU validation jobs completed successfully.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/31841805938 Boot Time to EFI Shell
Dependencies
This comment was automatically generated by the Patina QEMU PR Validation Post workflow. |
vineelko
approved these changes
Aug 14, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
apop5
approved these changes
Aug 14, 2026
os-d
approved these changes
Aug 14, 2026
This file is an orphaned version of: `patina_dxe_core\src\cpu\efi_cpu\x64\cpu.rs` That was accidentally left in place during earlier refactors of the CPU code. It also follows some practices like directly referencing `r-efi` that we want to avoid in favor of using `patina::standard::efi` so it is being removed to avoid confusion. Refactor references: - Moved to patina_dxe_core in 3d59861 - Accidentally added back in ac11069 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
`r_efi::efi` is re-exported from `patina::standard::efi`, with the
guidance that code should depend on the re-export.
While r-efi is only an explicit crate dependency of the `patina`
crate today, it could inadvertently be added as a direct dependency
of other crates in the repo in the future.
This change adds a deny rule to the `deny.toml` file to prevent direct
dependencies on `r-efi` outside of the SDK crate.
This also allows tracking of transitive dependencies on `r-efi`.
Both `patina` and `getrandom` are allowed to depend on `r-efi` as
`getrandom` does so today used as follows by `patina_internal_core`:
```
warning[unmatched-wrapper]: direct parent 'getrandom = 0.4.3' of
banned crate 'r-efi = 6.0.0' was not marked as a wrapper
┌─ deny.toml:146:16
│
146 │ { crate = "r-efi", reason = "Depend on `patina` and use `patina::standard::efi` instead of r-efi directly.", wrappers = ["patina"] }
│ ━━━━━ ───────────────────────────────────────────────────────────────────────────── reason
│ │
│ banned here
│
├ r-efi v6.0.0
└── getrandom v0.4.3
└── rand v0.10.2
└── (dev) patina_internal_core v23.0.2
└── patina_dxe_core v23.0.2
├── (dev) patina_adv_logger v23.0.2
```
A small touchup to arch.rs is made to use the re-exported path.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
makubacki
force-pushed
the
ban_non_sdk_dep_on_r_efi_directly
branch
from
August 14, 2026 21:04
c6ac45f to
e82b6d6
Compare
Collaborator
Author
|
Pushed 4891cac to remove a file that is not caught by cargo-deny because it is orphaned. Included in this PR because it imports |
makubacki
enabled auto-merge (rebase)
August 14, 2026 21:09
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.
Description
r_efi::efiis re-exported frompatina::standard::efi, with the guidance that code should depend on the re-export.While r-efi is only an explicit crate dependency of the
patinacrate today, it could inadvertently be added as a direct dependency of other crates in the repo in the future.This change adds a deny rule to the
deny.tomlfile to prevent direct dependencies onr-efioutside of the SDK crate.This also allows tracking of transitive dependencies on
r-efi.Both
patinaandgetrandomare allowed to depend onr-efiasgetrandomdoes so today used as follows bypatina_internal_core:A small touchup to arch.rs is made to use the re-exported path.
Also includes a commit to remove a file referencing
r_efithat is not included in the crate:patina_internal_cpu: Delete orphaned file (cpu.rs)
This file is an orphaned version of:
patina_dxe_core\src\cpu\efi_cpu\x64\cpu.rsThat was accidentally left in place during earlier refactors of the
CPU code. It also follows some practices like directly referencing
r-efithat we want to avoid in favor of usingpatina::standard::efiso it is being removed to avoid confusion.
Refactor references:
How This Was Tested
cargo make denybefore and after the deny.toml changeIntegration Instructions