-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Enable compiling with crossgen2
#32508
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
Conversation
dougbu
commented
May 7, 2021
- taking over the good work @davidwrighton has done in Enable compiling with crossgen2 #31778
So far, have only rebased on latest 'main'. Working on test runs using the |
.azure/pipelines/quarantined-pr.yml
Outdated
@@ -65,7 +65,7 @@ jobs: | |||
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative | |||
-projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true | |||
/p:BuildInteropProjects=true /p:RunTemplateTests=true | |||
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log | |||
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log |
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.
!revert! before squish and merge
<Reference Include="Microsoft.NETCore.App.Crossgen2.$(BuildOsName)-$(BuildArchitecture)" | ||
ExcludeAssets="All" | ||
PrivateAssets="All" | ||
GeneratePathProperty="true" /> |
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.
@davidwrighton, questions from #31778:
I suggest
Microsoft.NETCore.App.Crossgen2.*
packages should contain a same-named.props
file that sets a property for the tool path. This didn't make sense forMicrosoft.NETCore.App.Runtime.*
packages but definitely does now. Wouldn't need the path property nor some of the later complications finding the tool if package were more self-describing.Any possibility of removing the need for workarounds (hacks) like https://github.com/dotnet/aspnetcore/pull/31778/files#diff-eb8fd31a7971d712606a187ea074d0bd5d6ea85aae5a707107fd998216986ea5R117, https://github.com/dotnet/aspnetcore/pull/31778/files#diff-eb8fd31a7971d712606a187ea074d0bd5d6ea85aae5a707107fd998216986ea5R365-R368, and related bits in the future❔
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.
Those may be removed in the future, but not in the next month or two. I'm plenty busy with other build system issues.
baf2973
to
44c150b
Compare
@davidwrighton @agocke @Lxiamail finally seeing the expected |
@sebastienros heads up. When I merge this (after removing the last two commits) tomorrow (again, I hope), may see an impact on the perf results. @davidwrighton suspects the initial gains will be modest but we should expect more over time. Let us know if perf decreases. |
@davidwrighton help please. I'm seeing test failures I didn't expect e.g. at https://dev.azure.com/dnceng/public/_build/results?buildId=1138686&view=ms.vss-test-web.build-test-results-tab&runId=34540072&resultId=123944&paneView=debug
In this case, build was on BuildPool.Server.Amd64.VS2019.Open and test ran on a Windows.10.Amd64.Server20H2.Open Helix agent. |
@dougbu, I think those test failures are an issue caused by running on the wrong runtime. Note the result for https://dev.azure.com/dnceng/public/_build/results?buildId=1138686&view=ms.vss-test-web.build-test-results-tab&runId=34540072&resultId=123876&paneView=debug which actually passes. I can see in AzDo, that the failing test ran as part of workitem Looking at those names, I'm suspicious. Does that imply that the failing test actually tried to run the binary on the .NET 4.6.1 runtime, and the succeeding test ran on the .NET 6 runtime. If so, that is an indication that the test passed just fine as we don't expect these images to actually work on .NET 4.6.1 after running crossgen. |
eng/targets/Helix.targets
Outdated
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" | ||
Retries="$(CopyRetryCount)" | ||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" | ||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" /> |
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.
Does that imply that the failing test actually tried to run the binary on the .NET 4.6.1 runtime, and the succeeding test ran on the .NET 6 runtime.
Yes, that's almost definitely what it means. I didn't consider the TFM in this block. Should only <Copy/>
when targeting net6.0
. I'll add a commit or two to (a) focus temporarily on Windows ➡️ Windows and Linux ➡️ Linux jobs (because the other combinations are failing as consistently as we expect) and (b) fix this targeting issue.
9cc9ddf
to
885c31a
Compare
🆗 @davidwrighton we're down to two distinct problems that I'm not understanding
Neither of these problems block the real work because we don't normally |
Hmm, that's not very clear. I mean either the client code (that in the Background: This PR is both using |
Don't fret over Caching_SendFileWithFullContentLength_Cached, those tests have never been the most reliable. You can quarantine it and open an issue. |
@dougbu I can't tell you if With respect to the arm64 disk space failure, I suspect that you are getting very close to running out of disk space on all architectures, but that the arm64 binaries are larger than on other architectures. (This is expected. Our arm64 compiler produces a larger output than our x64 compiler). I see that you've injected a disk space check into the set of jobs, but that it executes very early. I would like to see a second |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Resolved this in my "Move to Core-Eng build agents" commit. But, the size difference we're talking about is pretty big. A regular build seems to use 16G of diskspace and disks on the hosted agents tend to have ~22G available on the / disk. We'll see if the switch Just Works™️ |
/ping reviewers. This is green (🍏📗🟢💚). Thanks @davidwrighton❕ |
/ping reviewers |
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.
Code changes all look reasonable, but I suggest adding a bunch of comments to Microsoft.AspNetCore.App.Runtime.csproj
where you made changes - many of the new properties/items/targets are pretty esoteric/non-obvious
That's a bit strange since what @davidwrighton did exactly matches what we have for |
What I mean is that somebody reading that file might be confused as to the purpose of the properties you're setting, etc. in this PR. That's probably true for |
…ng linux-musl from the build
- should resolve problems w/ disk space in "Tests: Helix ARM64 matrix" job - need `node` in this job for some reason
- remove many properties related only to the `crossgen` tool - may have missed a few of course nits: - `crossgen` -> `crossgen2` in a few comments - add / expand a few comments to improve clarity
🆗 I've removed Two main simplifications:
Less important but it is nice to require slightly fewer properties and not to need an extra slash at the end of |
I think part of what you were seeing was the new properties weren't in the same hunk as the old ones, hiding a few existing comments. Let me know if the current file looks better. |
Hello @dougbu! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@dougbu We're hoping to remove crossgen from the runtime packages soonish, but its a slow process moving everyone off of it. |
Hi @davidwrighton. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
/backport to release/6.0-preview5 |
Started backporting to release/6.0-preview5: https://github.com/dotnet/aspnetcore/actions/runs/875859566 |