-
Notifications
You must be signed in to change notification settings - Fork 289
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
[repo] Centralize TFMs for easier management #2087
Conversation
<!-- Tweak style rules for Geneva: Allow underscores in constant names and allow regions inside code blocks --> | ||
<NoWarn>$(NoWarn);SA1123;SA1310</NoWarn> | ||
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. --> | ||
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks> | ||
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did the OS check go?
@@ -1,5 +1,4 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
|
|||
<PropertyGroup> | |||
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. --> | |||
<TargetFrameworks>net8.0;net462</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the net8.0
be replaced with a property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done a6833f7.
...enTelemetry.Instrumentation.GrpcNetClient/OpenTelemetry.Instrumentation.GrpcNetClient.csproj
Show resolved
Hide resolved
I didn't make a detailed review, but I have a question why do you want to add |
|
Hey @joegoldman2 we discussed this a bit on our weekly SIG meeting today. Probably more questions came out of the discussion than answers 🤣 Would you be able to join next week or one of the upcoming ones to discuss with us? Calendar is available here: https://calendar.google.com/calendar/u/0/embed?src=c_2bf73e3b6b530da4babd444e72b76a6ad893a5c3f43cf40467abc7a9a897f977@group.calendar.google.com Look for ".NET SIG" on Tuesdays. |
Hey! The timezone isn't ideal for me and I'll have to see if I'm available. I'll get back to you.
|
Is someone able to explain the downside of targeting For example, I recently opened up a PR here to add .NetStandard as a TFM to the ConfluentKafka Instrumentation because I am unable to use the instrumentation in my company's Kafka library right now since our kafka library uses .NetStandard, and is nested in call stacks of several libraries all targeting .NetStandard. |
Here's a summary of my thoughts I shared during our SIG meeting.
|
+1, I did some work in opentelemetry-dotnet (e.g. open-telemetry/opentelemetry-dotnet#4903, open-telemetry/opentelemetry-dotnet#4911, open-telemetry/opentelemetry-dotnet#4907, open-telemetry/opentelemetry-dotnet#4904) due to a very simple reason: all the projects in that repo are managed by the same set of developers, each time we need to change all of them, so it is better to just consolidate things into a single place and change that single place each time. For the contrib repo, my understanding is that the components are owned by different folks, if I need to update a package and push a release, I don't want other packages to be updated or released. Similarly, I don't want someone who tries to update their package to push me to release packages that I own. |
Thank you @alanwest and @reyang for your feedback. It is really interesting. I understand the reasons for not mutualizing targets, as the packages are maintained by different people and you don't want to create strong dependencies between them for all the reasons already mentioned.
|
Thanks @joegoldman2! I want us to be very clear on this:
|
I am not sure if it is good for all cases. Keep in mind that some features/improvements are available only for .NET6/8+ targets. You need to be very careful when you consider adding legacy .NET Standard 2.0. There is one more important thing. How to test such target? Most of the libraries already targeting .net6.0 and .net462. In such cases these versions will be taken to unit tests projects.
Examples - I would say yes. Most of them should be pinned to net8.0. You need to only verify Asp.net, owin and wcf. Tests, probably we need only targets executed during the pipeline (.net8, .net6 (will be dropped in November), .net462, shortly .net9). There is a open question what to do with additional targets (like for Geneva). |
I think we can add |
One additional question: do we want to start replacing .NET 6 target with .NET 8 (it can be done at the time as adding .NET Standard 2.0 target)? |
👍💯 |
Changes
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes