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

Crossgen Task #2997

Merged
merged 9 commits into from
Mar 29, 2019
Merged

Crossgen Task #2997

merged 9 commits into from
Mar 29, 2019

Conversation

fadimounir
Copy link

Intitial implementation of the crossgen task, and plumbing in the SDK targets to invoke the task. The crossgen task invokes crossgen from the runtime pack.

  • Task triggered when is set to true in the main app's project file (opt-in feature)
  • Added new condition to download runtime packs: when the ReadyToRun property is set.
  • Adding R2R exclusion list capability
  • Symbol emission is optional (opt-in, when ReadyToRunEmitSymbols is set to true)

@fadimounir
Copy link
Author

@nguerrera Here's the crossgen task. It's still WIP since I haven't tested on OSX yet (tested on Linux and Windows).

@nguerrera nguerrera added this to the 3.0.1xx milestone Mar 1, 2019
@fadimounir
Copy link
Author

Tested on OSX

Copy link
Contributor

@nguerrera nguerrera left a comment

Choose a reason for hiding this comment

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

I am not finished reviewing everything, but didn't want to hold back these comments.

src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/RunCrossgen.cs Outdated Show resolved Hide resolved
@fadimounir
Copy link
Author

@nguerrera Doesn't look like I have access to merge this. Could you please take another look at the new changes I posted, and merge if it looks good?

Copy link
Contributor

@nguerrera nguerrera left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in doing a full review. I have some more concerns noted above.

Also, tests need to be added.

@fadimounir
Copy link
Author

@nguerrera I changed the platform validation logic a bit to consume the runtime graph as we discussed, to validate target/host platform compatibility. It now does so by comparing the best matching RID of the target to the best matching RID of the host. Tested it on Ubuntu, OSX, Alpine, and RHEL.6.

I need some pointers on how to add a test to the CI. I can add it as a separate PR.

@fadimounir fadimounir changed the base branch from release/3.0.1xx to master March 18, 2019 21:54
@fadimounir fadimounir force-pushed the crossgentask branch 3 times, most recently from 75b4b85 to a7933fa Compare March 18, 2019 22:19
@nguerrera
Copy link
Contributor

For the tests, look a GuvenThatWeWantToCrossPublish for simple example.

You probably want to mix this with PackageReferences and ProjectReferences to get more than one file to crossgen and to test more cases. GivenThatWeWantDesignerSupport shows this.

You can enable ReadyToRun via TestProject.AdditionalProperties.

It would be nice to have negative coverage for the mismatched host, and coverage of all the options (PDBs, exclude list).

@nguerrera
Copy link
Contributor

I need some pointers on how to add a test to the CI. I can add it as a separate PR.

We always include tests in the original PR. I've put some pointers above. Feel free to grab some time with me if you want to pair on this or have more questions about it.

fadimounir added 8 commits March 29, 2019 11:43
… targets to invoke the task.

Added new condition to download runtime packs: when the ReadyToRun property is set.
Adding R2R exclusion list capability
…ring to have a ToolTaskBase)

Fixing logic with RuntimeIdentifier values used by the task (now it's read from the RuntimePack)
…that calls ExecuteTool multiple times.

The split also enables msbuild to automatically skip entries that are already up to date.
Removed ToolTaskBase since it's not really adding much value
@nguerrera nguerrera merged commit 7d6b26d into dotnet:master Mar 29, 2019
@fadimounir fadimounir deleted the crossgentask branch April 4, 2019 18:16
wli3 pushed a commit that referenced this pull request Feb 7, 2020
….1 (#2997)

- Microsoft.DotNet.Cli.Runtime - 5.0.100-alpha1.19480.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants