Skip to content

Conversation

@mic-max
Copy link
Contributor

@mic-max mic-max commented Sep 2, 2021

Fixes #2081

Changes

  • Added dotnet package validation following this guide: https://devblogs.microsoft.com/dotnet/package-validation
  • Had to increase LangVersion from 8.0 to 10.0 due to this error
    • F:\Git\mic-max\opentelemetry-dotnet\src\OpenTelemetry\obj\Debug\net6.0\OpenTelemetry.ImplicitNamespaceImports.cs(8,1): error CS8400: Feature 'global using directive' is not available in C# 8.0. Please use language version 10.0 or greater. [F:\Git\mic-max\opentelemetry-dotnet\src\OpenTelemetry\OpenTelemetry.csproj]

PackageVersion and PackageValidationBaselineVersion need to be decided on.

@mic-max
Copy link
Contributor Author

mic-max commented Sep 2, 2021

Questions:

@mic-max
Copy link
Contributor Author

mic-max commented Sep 2, 2021

I was able to get the compiler to complain to me about both the examples from the article:

  • When a function being added with signature A existed in net6 and existed with signature B in other net versions
  • When an existing function is altered to have a different signature than what it had in the .csproj specific previous release.
    • I'm guessing Microsoft.Dotnet.PackageValidation downloads that versions specification from NuGet to use for this comparison?

Note: These errors occur during the dotnet pack command rather than the dotnet build command.

@utpilla
Copy link
Contributor

utpilla commented Sep 2, 2021

Questions:

We would want to replace ApiCompat checks with PackageValidation eventually. PackageValidation will be release with .NET 6 so we will have to wait until it's stable.

  • Should all .publicApi folders be deleted?

Refer to @cijothomas 's comment here: #2075 (comment)

"update the release process, so that every stable release updates the "base or contract" version to check compat against" where is this process?

This is done when calling the powershell script to install the base contract assemblies. After every stable release, OTelPreviousStableVer in Common.props should be updated.

You can create a new workflow until the time we get rid of ApiCompat. This workflow calls the powershell script to install the base contract assemblies.

@utpilla
Copy link
Contributor

utpilla commented Sep 2, 2021

Note: These errors occur during the dotnet pack command rather than the dotnet build command.

This is expected. ApiCompat checks compatibility for assemblies so it only needs to build. PackageValidation checks compatibility for .nupkg files so it needs to pack.

@mic-max
Copy link
Contributor Author

mic-max commented Sep 2, 2021

Build from the work done in this PR dotnet/aspnetcore#35846 👍

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Jan 28, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2022

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale Issues and pull requests which have been flagged for closing due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ApiCompat improvements

2 participants