microsoft / mu_basecore

Project Mu BaseCore
https://microsoft.github.io/mu/
Other
242 stars 124 forks source link

BaseTools/build_rule.template: Add FILE_GUID to the environment for Rust modules #1108

Closed zurcher closed 1 month ago

zurcher commented 2 months ago

Description

This change allows Rust modules to know their own FILE_GUID using the env!("FILE_GUID") macro, providing a self-identification mechanism equivalent to gEfiCallerIdGuid in legacy EDK2 code.

For details on how to complete to complete these options and their meaning refer to CONTRIBUTING.md.

How This Was Tested

Inserted prints containing env!("FILE_GUID") in multiple modules as well as a shared library crate and verified that the GUID which was printed corresponded to the correct parent module.

Integration Instructions

Can be retrieved directly in string form with env!("FILE_GUID") or converted to useful data with uuid!(env!("FILE_GUID"))

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 1.35%. Comparing base (5e8c881) to head (640cad6).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/202311 #1108 +/- ## ================================================ Coverage 1.34% 1.35% ================================================ Files 1303 1303 Lines 333793 333838 +45 Branches 4920 5103 +183 ================================================ + Hits 4483 4512 +29 - Misses 329237 329243 +6 - Partials 73 83 +10 ``` | [Flag](https://app.codecov.io/gh/microsoft/mu_basecore/pull/1108/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | Coverage Δ | | |---|---|---| | [MdeModulePkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/1108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `0.68% <ø> (ø)` | | | [MdePkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/1108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `5.40% <ø> (ø)` | | | [NetworkPkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/1108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `0.55% <ø> (ø)` | | | [PolicyServicePkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/1108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `30.41% <ø> (+1.65%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.