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

First Round of Trimming Analysis #2037

Closed
wants to merge 3 commits into from

Conversation

eerhardt
Copy link
Contributor

This enables trimming analysis on a subset of core assemblies:

  • Microsoft.IdentityModel.Abstractions
  • Microsoft.IdentityModel.Logging

It also enables trimming analysis for the JsonWebToken constructor. More scenarios will be analyzed in the future, as we enable more scenarios for trimming.

Contributes to #2035

See https://learn.microsoft.com/dotnet/core/deploying/trimming/prepare-libraries-for-trimming for more information on how to prepare libraries for trimming. Being "trim compatible" is the first step to being "NativeAOT compatible".

This addresses the first bullet in #2035.

cc @brentschmaltz

This enables trimming analysis on a subset of core assemblies:

* Microsoft.IdentityModel.Abstractions
* Microsoft.IdentityModel.Logging

It also enables trimming analysis for the JsonWebToken constructor. More scenarios will be analyzed in the future, as we enable more scenarios for trimming.

Contributes to AzureAD#2035
@brentschmaltz
Copy link
Member

@eerhardt i cloned your repo and running build.cmd from a cmd prompt resulted in a build failure.

Cloned to:
C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\

sample of the errors:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.Managed.Core.targets(190,5): error : Could not find a part of the path 'C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\test\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests\obj\Debug\net452\Microsoft.Identit
yModel.ManagedKeyVaultSecurityKey.Tests.GeneratedMSBuildEditorConfig.editorconfig'. [C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\test\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests.csproj::TargetFramework=net452]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.Managed.Core.targets(190,5): error : Could not find a part of the path 'C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\test\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests\obj\Debug\net461\Microsoft.Identit
yModel.ManagedKeyVaultSecurityKey.Tests.GeneratedMSBuildEditorConfig.editorconfig'. [C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\test\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests.csproj::TargetFramework=net461]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.Managed.Core.targets(190,5): error : Could not find a part of the path 'C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\test\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests\obj\Debug\net472\Microsoft.Identit
yModel.ManagedKeyVaultSecurityKey.Tests.GeneratedMSBuildEditorConfig.editorconfig'. [C:\github\wilson\eehardt\azure-activedirectory-identitymodel-extensions-for-dotnet\test\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests\Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests.csproj::TargetFramework=net472]

@eerhardt
Copy link
Contributor Author

Thanks, looking.

BTW - is there PR validation hooked up in this repo? I don't see a "check" for building and running tests. Some PRs have the checks for "Wilson-6x-PR" and some don't.

Has checks:

No Checks:

@eerhardt
Copy link
Contributor Author

i cloned your repo and running build.cmd from a cmd prompt resulted in a build failure.

@brentschmaltz I'm not seeing this build error locally. Does it repro if you git clean -xdff and build again? Does the dev branch build cleanly on that machine?

I didn't change Microsoft.IdentityModel.ManagedKeyVaultSecurityKey.Tests, or any build infrastructure, so I'm confused why those errors would be occurring in just my PR.

I did notice that I need to update buildConfiguration.xml to include my new test project though. I'll push that change up.

…he publish process doesn't complete in a timely manner.
@eerhardt
Copy link
Contributor Author

I plan on moving this to the main repo in order to get PR validation tests to run against this change. I am just waiting for permission to do that.

In the meantime - cc @vitek-karas in case you want to take a look.

@eerhardt
Copy link
Contributor Author

Closing in favor of #2042.

@eerhardt eerhardt closed this Mar 27, 2023
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.

None yet

2 participants