-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 support for .NET 8 #1144
Add support for .NET 8 #1144
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1144 +/- ##
==========================================
+ Coverage 84.56% 84.59% +0.02%
==========================================
Files 308 308
Lines 6791 6802 +11
Branches 1044 1049 +5
==========================================
+ Hits 5743 5754 +11
Misses 839 839
Partials 209 209
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@martintmk Do you want to push your changes to use |
Yup, but first let me create another PR that's prerequisite for this. Then I'll push changes directly to yours. |
I'll rebase this once #1192 is merged, then you should be able to put the |
614277f
to
e75c9d2
Compare
@martintmk Could you rebase this onto |
Rebased. Few tests are failing, we can address that later. |
I'll look at bumping this to preview 5 and fixing the tests today. |
I tweaked a few assertions with what I thought was the correct change, but I wasn't 100% what the intended behaviour change was for the other failures. |
I'll try and update this again once #1355 is merged. |
Blocked on adopting |
@martintmk Would be good to get some feedback on the changes in 7be0f93. I've removed the Moq-based implementation so we're not introspecting on the implementation details of the clock too much, but I'm not 100% sure the test refactoring is correct, even though they pass locally. I also simplified the |
@martincostello, the extra code in Your test refactorings are fine, otherwise some mutants would have survived. But I suggest to make those changes in the main branch too. |
Cool, thanks. Yep, today I'll tidy up this branch a bit and then cherry-pick some of the changes to go into main now rather than wait on 8.0 RTM. |
Backport various changes from App-vNext#1144: - Simplify NuGet package version management. - Simplify TimeProviderExtensions. - Enable .NET analyzers. - Remove `MockTimeProvider`. - Minor code formatting clean-ups.
aef9012
to
6cd6dfe
Compare
6cd6dfe
to
1ccde43
Compare
Build failures are due to a known issue in the RC2 SDK when a newer version of a global tool is available than in the config file. |
Build with the .NET 8 RC2 SDK.
Use new artifacts output.
- Use C#12 collection initializers where relevant. - Suppress false positives when using `TheoryData`. - Remove some redundant code analysis suppressions.
Resolve CP0001 and CP0002 warnings with the .NET 8 SDK.
Fix mutation tests by switching to Windows and updating the settings to support .NET 8 and C# 12.
- Fix NETSDK1204 error as cannot publish AoT on macOS. - Fix NETSDK1201 error on Linux and Windows.
f129d29
to
38f715b
Compare
Use the stable release of the .NET 8 SDK.
- Add `net8.0` targets. - Use .NET `TimeProvider` implementation. - Use `FakeTimeProvider` for tests. - Use new .NET 8 APIs where relevant. Co-Authored-By: martintmk <103487740+martintmk@users.noreply.github.com>
Update comment grammar.
Use stable .NET 8 NuGet package versions.
c99c755
to
12a6e03
Compare
Looks like there's a flaky test when testing for .NET Framework related to the metrics stuff. |
Does it means Polly doesn't support .net version prior to .net 8.0 anymore ? |
No it doesn't - it just means that Polly now includes a Previously we also had our own internal copy of If you have your own copy of it you'll either need to remove it, rename it or alias it to resolve the conflict. This isn't an issue unique to your use of Polly, you would have the same problem if you used any other NuGet package that also added a dependency on the new TimeProvider APIs. |
net8.0
TFM.System.TimeProvider
abstraction to resolve Use the new TimeProvider API from .NET 8 #1070.Relates to #1141, depends on #1738, resolves #1786.