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

[build] Use compiler constant to toggle experimental public apis #4735

Merged
merged 31 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
25c2d25
Attempting to make it easier to have experimental public api in the r…
CodeBlanch Aug 2, 2023
6ac362a
Add condition to ExposeExperimentalFeatures definition.
CodeBlanch Aug 2, 2023
01b9eae
Drop the extra shipped public api files.
CodeBlanch Aug 2, 2023
64f0d85
Upgrade Microsoft.CodeAnalysis.PublicApiAnalyzers to latest beta.
CodeBlanch Aug 2, 2023
3570de0
Tweak.
CodeBlanch Aug 2, 2023
ca84fcf
Added public api definitions that seem to be needed by the new beta.
CodeBlanch Aug 2, 2023
e9ba384
Use an experimental namespace.
CodeBlanch Aug 2, 2023
29cc171
Automatically set ExposeExperimentalFeatures in publish workflow.
CodeBlanch Aug 3, 2023
4654de7
Code review.
CodeBlanch Aug 3, 2023
3a8e562
Revert experimental namespace. Add XML remarks to public versions.
CodeBlanch Aug 7, 2023
9f252c4
Updates to OpenTelemetry.Api.ProviderBuilderExtensions logging api.
CodeBlanch Aug 8, 2023
a8db636
SDK updates moving logging and exemplar artifacts behind EXPOSE_EXPER…
CodeBlanch Aug 8, 2023
284d53f
CHANGELOG updates and fixes.
CodeBlanch Aug 8, 2023
b5dc172
Merge from main.
CodeBlanch Aug 8, 2023
d2638cc
MD lint.
CodeBlanch Aug 8, 2023
e9a42d0
More MD lint.
CodeBlanch Aug 8, 2023
dbe5984
Update ConsoleExporter for experimental features.
CodeBlanch Aug 8, 2023
b66bdd7
Updated in-memory exporter for experimental features.
CodeBlanch Aug 8, 2023
b29d488
CHANGELOG update for in-memory exporter.
CodeBlanch Aug 8, 2023
1339ce0
Update OTLP project for experimental features.
CodeBlanch Aug 8, 2023
8b8d9b1
Updated hosting project for experimental features.
CodeBlanch Aug 8, 2023
5cbf663
Fix for in-memory exporter public api files.
CodeBlanch Aug 8, 2023
d7f53cc
Fixes.
CodeBlanch Aug 8, 2023
7780b98
Merge remote-tracking branch 'upstream/main' into build-experimental-…
CodeBlanch Aug 9, 2023
498467d
Lint fixes.
CodeBlanch Aug 9, 2023
8ef1e58
CI workflow fix.
CodeBlanch Aug 9, 2023
76d5a7c
More lint fixes.
CodeBlanch Aug 9, 2023
88d3273
Use file scoping on AssemblyInfo helpers.
CodeBlanch Aug 9, 2023
463e977
Code review.
CodeBlanch Aug 10, 2023
65637b0
Update StyleCop and fix warnings using "file" or "required" modifiers.
CodeBlanch Aug 10, 2023
a112fc7
Merge branch 'main' into build-experimental-features
CodeBlanch Aug 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Common.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
Expand Down
16 changes: 16 additions & 0 deletions src/OpenTelemetry.Api.ProviderBuilderExtensions/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Console" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting" + AssemblyInfo.PublicKey)]
#endif

#if SIGNED
#pragma warning disable SA1400 // Access modifier should be declared
file static class AssemblyInfo
Copy link
Member Author

Choose a reason for hiding this comment

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

@sharwell I couldn't find an order for the modifiers that would make SA1400/SA1206 and IDE0036 happy. I'm sure you are aware of this but I thought I would mention it.

Choose a reason for hiding this comment

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

DotNetAnalyzers/StyleCopAnalyzers#3588

Fixed in 1.2.0-beta.507 and newer.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @sharwell! Fixed it up here: 65637b0

{
public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898";
public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7";
}
#else
file static class AssemblyInfo
{
public const string PublicKey = "";
public const string MoqPublicKey = "";
}
#pragma warning restore SA1400 // Access modifier should be declared
#endif
6 changes: 4 additions & 2 deletions src/OpenTelemetry.Api/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@
#endif

#if SIGNED
internal static class AssemblyInfo
#pragma warning disable SA1400 // Access modifier should be declared
file static class AssemblyInfo
{
public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898";
public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7";
}
#else
internal static class AssemblyInfo
file static class AssemblyInfo
{
public const string PublicKey = "";
public const string MoqPublicKey = "";
}
#pragma warning restore SA1400 // Access modifier should be declared
#endif
8 changes: 4 additions & 4 deletions src/OpenTelemetry.Extensions.Hosting/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)]

#if EXPOSE_EXPERIMENTAL_FEATURES
#if SIGNED
internal static class AssemblyInfo
#pragma warning disable SA1400 // Access modifier should be declared
file static class AssemblyInfo
{
public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898";
public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7";
}
#else
internal static class AssemblyInfo
file static class AssemblyInfo
{
public const string PublicKey = "";
public const string MoqPublicKey = "";
}
#endif
#pragma warning restore SA1400 // Access modifier should be declared
#endif
16 changes: 16 additions & 0 deletions src/OpenTelemetry/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests" + AssemblyInfo.PublicKey)]
#endif

#if SIGNED
#pragma warning disable SA1400 // Access modifier should be declared
file static class AssemblyInfo
{
public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898";
public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7";
}
#else
file static class AssemblyInfo
{
public const string PublicKey = "";
public const string MoqPublicKey = "";
}
#pragma warning restore SA1400 // Access modifier should be declared
#endif