Skip to content

Enable compiling with crossgen2 #31778

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

Closed
wants to merge 9 commits into from

Conversation

davidwrighton
Copy link
Member

Enable using crossgen2 instead of crossgen in build. Building block for enabling pgo for this repo.

Addresses #31040 (in this specific format)

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Apr 13, 2021
@davidwrighton davidwrighton requested a review from dougbu April 19, 2021 20:38
Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme know when CI build looks greener and mark the PR as ready for review at the same point please

<Reference Include="Microsoft.NETCore.App.Crossgen2.$(BuildOsName)-$(BuildArchitecture)"
ExcludeAssets="All"
PrivateAssets="All"
GeneratePathProperty="true" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for Microsoft.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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidwrighton davidwrighton marked this pull request as ready for review April 28, 2021 21:33
@davidwrighton davidwrighton requested a review from a team as a code owner April 28, 2021 21:33
@davidwrighton
Copy link
Member Author

@dougbu Can you take a look? I also attempted to add some tests of the generated product by removing the disabling of crossgen2 in a spot in the official build, but I don't have confidence this actually did anything useful. My plan is to remove that change to the yaml before checkin.

<Reference Include="Microsoft.NETCore.App.Crossgen2.$(BuildOsName)-$(BuildArchitecture)"
ExcludeAssets="All"
PrivateAssets="All"
GeneratePathProperty="true" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a particularly interesting change given we expect failures in the quarantined runs. Suggest instead removing /p:CrossgenOutput=false from the 'Tests: Helix x64' job's build steps in ci.yml. If the crossgen2'd assemblies are platform-specific with the command arguments you're currently using, I'd expect to see a lot of failures on Linux and macOS work items (ProjectTemplates.Test in particular) submitted from that job without the property setting.

@dougbu
Copy link
Contributor

dougbu commented Apr 29, 2021

My plan is to remove that change to the yaml before checkin.

Reverting that change makes sense but I'd like to see test failures showing we're producing the best images for each platform i.e. that we hit problems when crossgen2 is enabled.

Note we only use the shared Fx assemblies for a limited number of tests. Search for <TestDependsOnAspNetPackages>true</TestDependsOnAspNetPackages> in Helix-enabled test projects to find them. Might be worth copying Microsoft.AspNetCore.App.Runtime files over the assemblies that land in the Helix work item root to get unit tests using the crossgen2'd assemblies.

@davidwrighton
Copy link
Member Author

Doug is taking over this with #32508, so I'm closing this PR.

@ghost
Copy link

ghost commented May 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants