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] Fix ordering issues with ExposeExperimentalFeatures compiler switch #4828

Merged

Conversation

CodeBlanch
Copy link
Member

Changes

  • Fixes the order of things so EXPOSE_EXPERIMENTAL_FEATURES constant is set AFTER the version resolution logic fires

@CodeBlanch CodeBlanch requested a review from a team September 6, 2023 00:35
@@ -59,6 +59,19 @@
<Message Importance="high" Text="**AssemblyVersionDebug** TargetFramework: $(TargetFramework), MinVerVersion: $(MinVerVersion), MinVerMajor: $(MinVerMajor), MinVerMinor: $(MinVerMinor), MinVerPatch: $(MinVerPatch), MinVerPreRelease: $(MinVerPreRelease), BuildNumber: $(BuildNumber), FileVersion: $(FileVersion), ExposeExperimentalFeatures: $(ExposeExperimentalFeatures)" />
</Target>

<Target Name="ResolveExposeExperimentalFeatures" AfterTargets="MinVer">
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be run after AssemblyVersionTarget?

Suggested change
<Target Name="ResolveExposeExperimentalFeatures" AfterTargets="MinVer">
<Target Name="ResolveExposeExperimentalFeatures" AfterTargets="AssemblyVersionTarget">

Copy link
Member Author

Choose a reason for hiding this comment

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

I had that at first but AssemblyVersionTarget gets skipped for non-publish builds and we want this section to always run.

Copy link
Contributor

Choose a reason for hiding this comment

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

When publishing builds, is the ordering guaranteed? We don't want this target to be evaluated before AssemblyVersionTarget.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not 100% sure about that, but I changed it so it now has a DependsOnTargets="AssemblyVersionTarget"

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #4828 (c3b4a60) into main (4427e88) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4828   +/-   ##
=======================================
  Coverage   83.93%   83.93%           
=======================================
  Files         293      293           
  Lines       11998    11998           
=======================================
  Hits        10070    10070           
  Misses       1928     1928           

@utpilla utpilla merged commit 268d29a into open-telemetry:main Sep 6, 2023
@CodeBlanch CodeBlanch deleted the experimental-features-build-fix branch September 6, 2023 04:50
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.

3 participants