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

Gen facades cleanup #7401

Merged
merged 5 commits into from
May 19, 2021
Merged

Gen facades cleanup #7401

merged 5 commits into from
May 19, 2021

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented May 18, 2021

  • Remove the ILRewriter path in GenFacades
  • Avoid custom GetCompileItems target in favor of the exposed SourceFilesProjectOutputGroup target so that the GenFacades package doesn't need to be referenced by contract projects anymore.
  • Perf improvements by a) not reading the exclusion file inside a loop for every passed in source file when generating a PNSE and b) not dumping the original assemblies by default for zero version seed rewriting.
  • Minor code cleanup in GenAPI.targets, i.e. not exposing the IntermediateTargetPath property in it
  • Some more style nits to avoid accidental target or property name binclashes by underscoring _ internal ones.

Before merging I want to wait for dotnet/runtime#52793 to be merged and then test the change in dotnet/runtime via a private package feed.

@ViktorHofer ViktorHofer requested review from ericstj and Anipik May 18, 2021 13:44
@ViktorHofer ViktorHofer self-assigned this May 18, 2021
@ericstj
Copy link
Member

ericstj commented May 18, 2021

One thing I was thinking about as interesting to potentially improve perf would be moving this to a C# source generator.

@ViktorHofer
Copy link
Member Author

ViktorHofer commented May 18, 2021

One thing I was thinking about as interesting to potentially improve perf would be moving this to a C# source generator.

The not supported compile file is definitely a valid use case for a source generator. Would be interesting how much work it would be to switch from the task to the source generator and how much time we would save by that.

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

LGTM, make sure we thoroughly test the cleanup.

@@ -9,7 +9,6 @@
<!-- Libs -->
<CommandLineParserVersion>2.2.1</CommandLineParserVersion>
<CredentialManagementVersion>1.0.2</CredentialManagementVersion>
<MicrosoftCciVersion>4.0.0-rc3-24214-00</MicrosoftCciVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Surprised me to see this, I realized it was because Cci.Extensions didn't use the property:

<PackageReference Include="Microsoft.Cci" Version="4.0.0-rc3-24214-00" />

@ViktorHofer
Copy link
Member Author

Tested locally against runtime main and found some issues which I fixed in the last commit. Merging.

@ViktorHofer ViktorHofer merged commit 516eb1e into dotnet:main May 19, 2021
@ViktorHofer ViktorHofer deleted the GenFacadesCleanup branch May 19, 2021 09:31
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.

2 participants