Skip to content
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

RustEnvironmentCheck: Bugfix embedded quotes #749

Merged

Conversation

Javagedes
Copy link
Contributor

@Javagedes Javagedes commented Feb 22, 2024

Description

Replaces embedded double quotes with single quotes in the RustEnvironmentCheck plugin as embedded double quotes support when working with f-strings was only added in python 3.12, and this project should support python 3.10, 3.11, and 3.12.

File "C:\src\mu_plus\MU_BASECORE\BaseTools\Plugin\RustEnvironmentCheck\RustEnvironmentCheck.py", line 259
    f"  cargo binstall cargo-make {('--version ' + tool_versions.get("cargo-make", "")) if "cargo-make" in tool_versions else ""}"

SyntaxError: f-string: unmatched '('
  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

Verified the plugin works on 3.10, 3.11, and 3.12

Integration Instructions

N/A

Replaces embedded double quotes with single quotes in the
RustEnvironmentCheck plugin as embedded double quotes support when
working with f-strings was only added in python 3.12, and this project
should support python 3.10, 3.11, and 3.12.
@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Feb 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2c50498) 1.24% compared to head (7fe10b7) 1.24%.

Additional details and impacted files
@@               Coverage Diff               @@
##           release/202311     #749   +/-   ##
===============================================
  Coverage            1.24%    1.24%           
===============================================
  Files                1301     1301           
  Lines              332064   332064           
  Branches             5127     5127           
===============================================
  Hits                 4126     4126           
  Misses             327891   327891           
  Partials               47       47           
Flag Coverage Δ
MdeModulePkg 0.70% <ø> (ø)
MdePkg 5.37% <ø> (ø)
NetworkPkg 0.00% <ø> (ø)
PolicyServicePkg 30.20% <ø> (ø)
UnitTestFrameworkPkg ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Javagedes Javagedes merged commit d5379bd into microsoft:release/202311 Feb 22, 2024
42 checks passed
@Javagedes Javagedes deleted the RustEnvironmentCheck-bugfix branch February 22, 2024 18:25
ProjectMuBot referenced this pull request in microsoft/mu_tiano_platforms Feb 22, 2024
Javagedes referenced this pull request in microsoft/mu_tiano_platforms Feb 22, 2024
Bumps MU_BASECORE from `2023110001.0.2` to `2023110001.1.0`


Introduces 5 new commits in
[MU_BASECORE](https://github.com/microsoft/mu_basecore.git).

<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/mu_basecore/commit/973f63be0017d01024e6b4a950db4e6e85d8faea">973f63</a>
RustEnvironmentCheck: Check Version if specified (<a
href="https://github.com/microsoft/mu_basecore/pull/737">#737</a>)</li>
<li><a
href="https://github.com/microsoft/mu_basecore/commit/e3a139fa066c52271ac490a19b9d5bad6f9c7a18">e3a139</a>
remove edk2-basetools (<a
href="https://github.com/microsoft/mu_basecore/pull/732">#732</a>)</li>
<li><a
href="https://github.com/microsoft/mu_basecore/commit/35d06ff4ddaa68a0e62cfb64b5d1225930e1eb43">35d06f</a>
BaseTools/RustEnvironmentCheck: Allow no tools in toolchain file (<a
href="https://github.com/microsoft/mu_basecore/pull/746">#746</a>)</li>
<li><a
href="https://github.com/microsoft/mu_basecore/commit/2c504985e1c9fc44a002f7d2c1a44b31aa5a87d5">2c5049</a>
Edk2ToolsBuild: override basetoolsbin_ext_dep (<a
href="https://github.com/microsoft/mu_basecore/pull/745">#745</a>)</li>
<li><a
href="https://github.com/microsoft/mu_basecore/commit/d5379bdd63dc290d209b43746e0ab83108661ce4">d5379b</a>
RustEnvironmentCheck: Bugfix embedded quotes (<a
href="https://github.com/microsoft/mu_basecore/pull/749">#749</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact language:python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants