- Notifications
You must be signed in to change notification settings - Fork4.2k
Build bootstrap compiler in separate phase#72001
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This moves the infrastructure for building a bootstrap compiler into aseparate phase.The reason for this is to facilitate better performance investigations.Having the bootstrap compiler build inside our build makes it basicallyimpossible to profile using a freshly built compiler to build our repo.Having separate phases mean that locally I can now- build the bootstrap compiler- start the profiler- rebuild roslynOverall I think it's also just a bit cleaner this way.
jaredpar commentedFeb 8, 2024
@dotnet/roslyn-infrastructure PTAL Note: the test failures are related to a general Helix outage. This change impacts correctness legs which are all passing so feel it's ready for review. |
JoeRobich left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I like the switch to pwsh!
| Write-Host"Checking generated compiler files" | ||
| Exec-Script (Join-Path$PSScriptRoot"generate-compiler-code.ps1")"-test -configuration:$configuration" | ||
| Exec-Console dotnet"tool run dotnet-format whitespace . --folder --include-generated --include src/Compilers/CSharp/Portable/Generated/ src/Compilers/VisualBasic/Portable/Generated/ src/ExpressionEvaluator/VisualBasic/Source/ResultProvider/Generated/ --verify-no-changes" | ||
| Exec-Command dotnet"tool run dotnet-format whitespace . --folder --include-generated --include src/Compilers/CSharp/Portable/Generated/ src/Compilers/VisualBasic/Portable/Generated/ src/ExpressionEvaluator/VisualBasic/Source/ResultProvider/Generated/ --verify-no-changes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could this beExec-DotNet or does this need to use the dotnet CLI that is on PATH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This should beExec-DotNet. This is more working today by accident than design. I will fix that in the follow up PR that I'm just about to push.
Uh oh!
There was an error while loading.Please reload this page.
This moves the infrastructure for building a bootstrap compiler into a separate phase.
The reason for this is to facilitate better performance investigations. Having the bootstrap compiler always build inside our build makes it basically impossible to profile using a freshly built compiler to build our repo. Profiles capture both the build of the bootstrap and the subsequent build. Having separate phases makes it much easier to profile and also test out how changes work as the code outside the bootstrap involves.
This work allows me to now:
Overall I think it's also just a bit cleaner this way.
Further I took the opportunity to clean up the PowerShell code a bit and mostly move us to using
pwshinstead of having to rely on old PowerShell quirks