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

Extract TFM for DLLs shipped from this repo #4903

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

reyang
Copy link
Member

@reyang reyang commented Sep 29, 2023

No description provided.

@reyang reyang requested a review from a team September 29, 2023 17:54
@@ -3,7 +3,12 @@

<PropertyGroup>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<DefaultTargetFrameworks>net6.0;netstandard2.0;net462</DefaultTargetFrameworks>
<TargetFrameworksForLibraries>net6.0;netstandard2.0;net462</TargetFrameworksForLibraries>
<TargetFrameworksForLibrariesExtended>net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworksForLibrariesExtended>
Copy link
Contributor

Choose a reason for hiding this comment

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

curious - what's the rationale behind this naming? (I saw it's used for OTLP exporter and OpenTelemetry project.)

Copy link
Member Author

@reyang reyang Sep 29, 2023

Choose a reason for hiding this comment

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

Just a name for libs that need to target extra netstandard TFM.
My hope is that after this PR:

  1. All the TFMs are centrally managed in this single file. It'll help us to manage / review TFMs in the future (e.g. when we add net8 or retire net7), and stop bleeding as new libs being added.
  2. We will do the same for tests/examples.
  3. We will keep reducing the number of different targets, ideally I hope that we end up with 3 combinations: TargetFrameworksForLibraries, TargetFrameworksForTests, TargetFrameworksForExamples

Copy link
Member

Choose a reason for hiding this comment

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

Possible to do this here...

<TargetFrameworksForLibrariesExtended>$(TargetFrameworksForLibraries);netstandard2.1</TargetFrameworksForLibrariesExtended>

...or order needs to be preserved?

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 feel inheritance is not adding much value, and is creating issue for IDEs/tools.
Ultimately we should try to align all the TFMs by reducing the number of variations IMHO.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #4903 (ef955d1) into main (c03ee85) will increase coverage by 0.22%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4903      +/-   ##
==========================================
+ Coverage   82.94%   83.16%   +0.22%     
==========================================
  Files         294      294              
  Lines       12200    12200              
==========================================
+ Hits        10119    10146      +27     
+ Misses       2081     2054      -27     
Flag Coverage Δ
unittests 83.16% <ø> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 5 files with indirect coverage changes

@@ -3,7 +3,12 @@

<PropertyGroup>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<DefaultTargetFrameworks>net6.0;netstandard2.0;net462</DefaultTargetFrameworks>
<TargetFrameworksForLibraries>net6.0;netstandard2.0;net462</TargetFrameworksForLibraries>
Copy link
Member

Choose a reason for hiding this comment

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

since everything in prod.props is a Library anyway, we could use diff. name by avoiding "library"...
DefaultTargetFrameworks, DefaultTargetFrameworksExtended seems okay to me plus the
TargetFrameworksForAspNetCoreInstrumentation, etc..

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 feel the word "default" is generating confusion. The way I look at it is that:

  1. There is no "default", all of them are explcit.
  2. Having "TargetFrameworksForXyz" makes it more consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you look at what I was doing in #4902, I consider this as "default" (the individual projects don't have to add TargetFrameworks at all since the props file covered it).

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @cijothomas I don't love "Libraries" in the name because all of these things are really libraries in some regard but I'm fine to leave as-is and we can continue to mess with it 😄

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Agree with making TFM into central place.
No strong opinion on what names to use, its immaterial for end users anyway.

@reyang reyang mentioned this pull request Sep 29, 2023
@CodeBlanch CodeBlanch merged commit d8ec26b into open-telemetry:main Sep 29, 2023
26 checks passed
@reyang reyang mentioned this pull request Sep 30, 2023
@reyang reyang deleted the reyang/extra-tfm branch March 2, 2024 04:02
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.

5 participants