Hello, Michael Kubacki and I have prepared the patches required to apply the uncrustify changes and enable EDK II CI to check all submitted patches have been run through uncrustify.
There are a couple minor updates expected over the next day. New versions of this email will be sent with the latest links and updates based on feedback from the community. We have verified through the CompareBuild GitHub Action that the format changes performed by uncrustify have no functional changes. All of the OBJ, LIB, DLL, EFI, FFS, FV, and FD files match 100% across 70 VS2019/GCC5 builds of all package/platform DSC files in the edk2 repo. The hard freeze will be extended after the edk2-stable202111 tag until all uncrustify related changes are committed. We do not expect this to take more than a few days. Do not push any PRs until the hard freeze is lifted. The changes are broken up into 7 patch series/PRs. The PRs are ordered so they can be submitted using the normal submission process and EDK II CI will pass for each one. Details are listed below. Uncrustify 73.0.3 for EDK II ============================= * Sources: https://dev.azure.com/projectmu/_git/Uncrustify * Documentation: https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme * Download: https://dev.azure.com/projectmu/Uncrustify/_packaging?_a=package&feed=mu_uncrustify&package=mu-uncrustify-release&protocolType=NuGet&version=73.0.3 Installing Uncrustify ====================== The Uncrustify tool is installed automatically when the Pytools environment is used and the stuart* commands are run to complete the environment setup. Please see: https://github.com/tianocore/edk2/tree/master/.pytool#running-ci-locally Uncrustify can also be installed from the download page listed above or built from sources from the source link above. The Documentation link provides instruction on how to run uncrustify from the command line or install as a Visual Studio Code plugin. The main uncrustify documentation also describes how to integrate with a few other editors. We have also discussed a client side githook. That effort has not started. Let us know if that is a feature you would find useful. Developer impact for new code reviews ====================================== Once the uncrustify checker is active in EDK II CI, developers must make sure their patches are run through the uncrustify tool before sending the patches for review. Developers must install and run uncrustify against changes files before sending patch review emails or submitting PR for EDK II CI. If EDK II CI detects and differences in soure formatting, then EDK II CI will fail and the developer must run uncrustify and resubmit the patches. Developer impact to patch series/PRs reviewed during edk2-stable201121 soft/hard freeze ======================================================================================= Developers must rebase their changes after the uncrustify source changes are committed. The branch with a preview of the uncrustify changes can be used to start this rebase work. https://github.com/mdkinney/edk2/tree/Bug_3737_3739_ApplyUncrustifyChanges_V5 Impacts to tracing history across the uncrusity changes ======================================================= <<TBD details on how to use git blame>> <<TBD details on other techniques>> Order of PRs to apply during extended hard freeze ================================================== 1) Update EmulatorPkg Win Host [BuildOptions] MSFT CC_FLAGS to not force debug information * https://bugzilla.tianocore.org/show_bug.cgi?id=3747 * https://github.com/mdkinney/edk2/tree/Bug_3747_EmulatorPkg_WinHost_ReproducibleBuild * https://github.com/tianocore/edk2/pull/2215 * Required for EmulatorPkg to pass CompareBuild for VS2019 IA32/X64 builds. 2) EccCheck should not revert staged and local changes * https://bugzilla.tianocore.org/show_bug.cgi?id=2986 * https://github.com/mdkinney/edk2/tree/Bug_2986_EccCheckRemoveGitRevert_V2 * https://github.com/tianocore/edk2/pull/2216 * Required for EDK II CI to complete in a reasonable period of time when processing the 4000+ source file style changes made by uncrustify. * Also fixes critical bugs that can potentially corrupt git state when EccCheck is run locally. 3) Update pytool LicenseCheck plugin to use temp directory for diff output file * https://bugzilla.tianocore.org/show_bug.cgi?id=3746 * https://github.com/mdkinney/edk2/tree/Bug_3746_LicenseCheckUseDiffOutputFile_V2 * https://github.com/tianocore/edk2/pull/2217 * Required to reduce EDK II CI build times. 4) Update Package YAML to ignore specific ECC files/errors * https://bugzilla.tianocore.org/show_bug.cgi?id=3749 * https://github.com/mdkinney/edk2/tree/Bug_3749_EccCheckIgnoreFilesErrors * https://github.com/tianocore/edk2/pull/2218 * Required to pass EccCheck 5) Update max job time from 60 min to 120 minutes in .azurepipelines/templates * https://bugzilla.tianocore.org/show_bug.cgi?id=3750 * https://github.com/mdkinney/edk2/tree/Bug_3750_IncreaseAzurePipelinesTimeout * https://github.com/tianocore/edk2/pull/2219 * Required to allow EccCheck of uncrustify changes to complete on Azure Pipelines CI agents without timing out. 6) UncrustifyCheck EDK II CI Plugin * https://bugzilla.tianocore.org/show_bug.cgi?id=3748 * https://edk2.groups.io/g/devel/message/83982 * Required to enforce all PRs submitted to EDK II CI match uncrustify format. 7) Uncrustify Source Changes * https://bugzilla.tianocore.org/show_bug.cgi?id=3737 * https://bugzilla.tianocore.org/show_bug.cgi?id=3739 * https://github.com/mdkinney/edk2/tree/Bug_3737_3739_ApplyUncrustifyChanges_V5 * EFI_D_ -> DEBUG changes required to pass PatchCheck * Uncrustify format changes required to pass UncrustifyCheck * PR not created yet because it will fail EccCheck without BZ #3749 Combined Branch/PR for Review/Test ================================== * Branch: https://github.com/mdkinney/edk2/tree/TestOnly_Uncrustify_PR_Series * PR: https://github.com/tianocore/edk2/pull/2220 Status = PASS * CompareBuild: https://github.com/mdkinney/edk2/actions/runs/1497388377 Status = FAIL for EmulatorPkg VS2019 IA32/X64 - Under investigation * Build Comparison results must pass 100% across the full set of PRs before the individual PRs can be pushed in the order listed above. Best regards, Mike -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84015): https://edk2.groups.io/g/devel/message/84015 Mute This Topic: https://groups.io/mt/87275050/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-