-
Notifications
You must be signed in to change notification settings - Fork 772
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
Add .NET8.0 targets to projects #4918
Add .NET8.0 targets to projects #4918
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4918 +/- ##
==========================================
+ Coverage 83.28% 83.30% +0.01%
==========================================
Files 295 295
Lines 12360 12361 +1
==========================================
+ Hits 10294 10297 +3
+ Misses 2066 2064 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
LGTM! Thank you.
src/OpenTelemetry.Api/.publicApi/Experimental/net8.0/PublicAPI.Unshipped.txt
Show resolved
Hide resolved
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.
See comment about unshipped vs shipped files.
I asked @Yun-Ting if this was required for AOT and she said: no. So my question is, why do we need net8.0 on all the targets? |
This goes back to the discussion for #4595, which added a net6.0 target to every project even if a particular project didn't really need any API from .NET 6. I think back then we agreed that doing this comes with a few benefits: overall ease of maintenance, newer code analysis etc. |
+1 And eventually .net6.0 targets will be removed next year. |
+1 |
I think we should consider adding the targets if/when we actually need something. |
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.
I'm not totally convinced adding these targets is good, but the work LGTM 😄
The benefits of bringing net8 to the projects are that we are able to access to new APIs and we can get better AOT/trimming experience at build-time if targeting net8 directly. |
This actually is not the case for trimming/AOT analyzer. Those are tied to the TFM of the project. (This is intentional because there's some interaction between the analyzers and the framework methods being annotated and maintaining a working matrix would be a giant headache). That said, I would not consider this the sole reason to upgrade (unless you have more specific needs which are met by the upgrade). There will be some slight differences in analyzer and Native AOT compiler behavior anyway and in case of discrepancies the NativeAOT compiler is always the correct one (presuming no bugs in the compiler). It should be enough to run the AOT test app (in CI and locally) targeting |
src/OpenTelemetry.Exporter.Prometheus.AspNetCore/PrometheusExporterMiddleware.cs
Outdated
Show resolved
Hide resolved
…orterMiddleware.cs Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
Adds .NET8.0 target to all projects.