-
Notifications
You must be signed in to change notification settings - Fork 852
[build] Use compiler constant to toggle experimental public apis #4735
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
Changes from all commits
25c2d25
6ac362a
01b9eae
64f0d85
3570de0
ca84fcf
e9ba384
29cc171
4654de7
3a8e562
9f252c4
a8db636
284d53f
b5dc172
d2638cc
e9a42d0
dbe5984
b66bdd7
b29d488
1339ce0
8b8d9b1
5cbf663
d7f53cc
7780b98
498467d
8ef1e58
76d5a7c
88d3273
463e977
65637b0
a112fc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,14 +46,17 @@ | |
| <NoWarn>$(NoWarn),1573,1712</NoWarn> | ||
| <PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <!--<MinVerVerbosity>detailed</MinVerVerbosity>--> | ||
| <ApiCompatExcludeAttributeList>$(RepoRoot)\build\GlobalAttrExclusions.txt</ApiCompatExcludeAttributeList> | ||
| </PropertyGroup> | ||
|
|
||
| <Target Name="AssemblyVersionTarget" AfterTargets="MinVer" Condition="'$(MinVerVersion)'!='' AND '$(BuildNumber)' != ''"> | ||
| <PropertyGroup> | ||
| <FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(BuildNumber)</FileVersion> | ||
| <ExposeExperimentalFeatures Condition="'$(MinVerPreRelease)' != ''">true</ExposeExperimentalFeatures> | ||
| <ExposeExperimentalFeatures Condition="'$(MinVerPreRelease)' == ''">false</ExposeExperimentalFeatures> | ||
|
Comment on lines
+55
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @utpilla I'll need to verify once this is all done and building, but this change should automatically toggle There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could probably also look at updating the publish-packages workflow by making use of the release event activity types: |
||
| </PropertyGroup> | ||
|
|
||
| <Message Importance="high" Text="**AssemblyVersionDebug** TargetFramework: $(TargetFramework), MinVerVersion: $(MinVerVersion), MinVerMajor: $(MinVerMajor), MinVerMinor: $(MinVerMinor), MinVerPatch: $(MinVerPatch), MinVerPreRelease: $(MinVerPreRelease), BuildNumber: $(BuildNumber), FileVersion: $(FileVersion), ExposeExperimentalFeatures: $(ExposeExperimentalFeatures)" /> | ||
| </Target> | ||
|
|
||
| <PropertyGroup> | ||
|
|
@@ -89,10 +92,10 @@ | |
|
|
||
| <!--PublicApi Analyzer--> | ||
| <ItemGroup> | ||
| <AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Shipped.txt" /> | ||
| <AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Unshipped.txt" /> | ||
| <None Include=".publicApi\*\PublicAPI.Shipped.txt" /> | ||
| <None Include=".publicApi\*\PublicAPI.Unshipped.txt" /> | ||
| <AdditionalFiles Include=".publicApi\Stable\$(TargetFramework)\PublicAPI.*.txt" /> | ||
| <AdditionalFiles Include=".publicApi\Experimental\$(TargetFramework)\PublicAPI.*.txt" Condition="'$(ExposeExperimentalFeatures)' == 'true'" /> | ||
| <AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.*.txt" /> | ||
| <None Include=".publicApi\**\PublicAPI.*.txt" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| param([string]$targetNetFramework) | ||
|
|
||
| $rootDirectory = Split-Path $PSScriptRoot -Parent | ||
| $publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false | ||
|
|
||
| $actualWarningCount = 0 | ||
|
|
||
| foreach ($line in $($publishOutput -split "`r`n")) | ||
| { | ||
| if ($line -like "*analysis warning IL*") | ||
| { | ||
| Write-Host $line | ||
| $actualWarningCount += 1 | ||
| } | ||
| } | ||
|
|
||
| pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Debug/$targetNetFramework/linux-x64 | ||
|
|
||
| Write-Host "Executing test App..." | ||
| ./OpenTelemetry.AotCompatibility.TestApp | ||
| Write-Host "Finished executing test App" | ||
|
|
||
| if ($LastExitCode -ne 0) | ||
| { | ||
| Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode | ||
| } | ||
|
|
||
| popd | ||
|
|
||
| Write-Host "Actual warning count is:", $actualWarningCount | ||
| $expectedWarningCount = 28 | ||
|
|
||
| $testPassed = 0 | ||
| if ($actualWarningCount -ne $expectedWarningCount) | ||
| { | ||
| $testPassed = 1 | ||
| Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount | ||
| } | ||
|
|
||
| Exit $testPassed | ||
| param([string]$targetNetFramework) | ||
| $rootDirectory = Split-Path $PSScriptRoot -Parent | ||
| $publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false /p:ExposeExperimentalFeatures=true | ||
| $actualWarningCount = 0 | ||
| foreach ($line in $($publishOutput -split "`r`n")) | ||
| { | ||
| if ($line -like "*analysis warning IL*") | ||
| { | ||
| Write-Host $line | ||
| $actualWarningCount += 1 | ||
| } | ||
| } | ||
| pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Debug/$targetNetFramework/linux-x64 | ||
| Write-Host "Executing test App..." | ||
| ./OpenTelemetry.AotCompatibility.TestApp | ||
| Write-Host "Finished executing test App" | ||
| if ($LastExitCode -ne 0) | ||
| { | ||
| Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode | ||
| } | ||
| popd | ||
| Write-Host "Actual warning count is:", $actualWarningCount | ||
| $expectedWarningCount = 28 | ||
| $testPassed = 0 | ||
| if ($actualWarningCount -ne $expectedWarningCount) | ||
| { | ||
| $testPassed = 1 | ||
| Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount | ||
| } | ||
| Exit $testPassed |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions | ||
| OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation<T>(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder! | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation<T>(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Func<System.IServiceProvider!, OpenTelemetry.Logs.LoggerProvider!, T!>! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation<T>(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Func<System.IServiceProvider!, T!>! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation<T>(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, T! instrumentation) -> OpenTelemetry.Logs.LoggerProviderBuilder! | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection!>! configure) -> OpenTelemetry.Logs.LoggerProviderBuilder! | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureOpenTelemetryLoggerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<OpenTelemetry.Logs.LoggerProviderBuilder!>! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! | ||
| static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureOpenTelemetryLoggerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<System.IServiceProvider!, OpenTelemetry.Logs.LoggerProviderBuilder!>! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! |
Uh oh!
There was an error while loading. Please reload this page.