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

Run tests under .NET 8 #2466

Merged
merged 8 commits into from
Nov 19, 2023

Conversation

vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Nov 15, 2023

Discussion in #2465

Enable tests to run under .NET 8.

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

Copy link

github-actions bot commented Nov 15, 2023

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.8
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@vbreuss vbreuss force-pushed the topic/vb/enable-net8 branch 2 times, most recently from 5bda626 to 672c1af Compare November 15, 2023 18:50
@vbreuss vbreuss marked this pull request as ready for review November 15, 2023 18:56
@vbreuss vbreuss marked this pull request as draft November 15, 2023 19:02
@coveralls
Copy link

coveralls commented Nov 15, 2023

Pull Request Test Coverage Report for Build 6920937500

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 97.475%

Files with Coverage Reduction New Missed Lines %
Src/FluentAssertions/Formatting/FormattedObjectGraph.cs 1 91.15%
Src/FluentAssertions/AssertionExtensions.cs 3 95.45%
Src/FluentAssertions/CallerIdentifier.cs 3 92.06%
Totals Coverage Status
Change from base Build 6874777002: 0.02%
Covered Lines: 11741
Relevant Lines: 11925

💛 - Coveralls

@vbreuss vbreuss marked this pull request as ready for review November 15, 2023 19:14
@dennisdoomen dennisdoomen self-requested a review November 17, 2023 15:50
Copy link
Member

@dennisdoomen dennisdoomen left a comment

Choose a reason for hiding this comment

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

We should update the documentation (index.html, releases.md, etc) to mention that we're compatible with .NET 8.0

docs/index.html Outdated
@@ -29,7 +29,7 @@
[<i class="fa fa-coffee"></i> Buy us a coffee](https://ko-fi.com/dennisdoomen){: .btn .btn--paypal}
<br/>
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or
BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET 6, .NET Standard 2.0 and 2.1.'
BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET 6, .NET 8, .NET Standard 2.0 and 2.1.'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be just a note that we are ".NET 8 ready", since we don't target .NET 8

Copy link
Member

Choose a reason for hiding this comment

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

Yes, something like that. Or we should rephrase all of the references to the frameworks. Like "Works with .NET Standard 2.0 and higher, .NET Framework 4.7 and higher and .NET 6 and higher"

Copy link
Member

Choose a reason for hiding this comment

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

I also think there are a couple of other places where we mention the version, including the NuGet description and such.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You were right. I found three more places 😄

@dennisdoomen
Copy link
Member

103 new problems were found

This is something of a challenge as well. All the issues reported might be existing ones that now get redetected through .NET 8 target. We may have to update the baseline or bump the limit.

… 2.0 and 2.1.` with `Works with .NET Standard 2.0 and higher, .NET Framework 4.7 and higher and .NET 6 and higher.`
@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 19, 2023

103 new problems were found

This is something of a challenge as well. All the issues reported might be existing ones that now get redetected through .NET 8 target. We may have to update the baseline or bump the limit.

How would I do this?

  • Updating the baseline will have to be done by you, right?
  • Bumping the limit would mean, increasing the failThreshold from 19 to 122 in qodana.yaml?

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 19, 2023

103 new problems were found

I had a look at the mentioned issues in the Files changed-Tab and most of them seem to be incorrect🤷:

  • All issues are only for two files (AssertionExtensions.cs and CallerIdentifier.cs)
  • The issues list (nearly) all using statements as incorrect.
    image,
  • Also the cannot resolve reference in XML comment seem incorrect
    image

@jnyrup
Copy link
Member

jnyrup commented Nov 19, 2023

According to https://youtrack.jetbrains.com/issue/QD-7660/Qodana-busted-in-.NET-8-RTM support for .NET 8 is not available yet, but will be with v233.
We're at QDNET-232.10203.29

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 19, 2023

@vbreuss Can you check what happens if you change args: --baseline,qodana.sarif.json,--ide,QDNET to args: --baseline,qodana.sarif.json,--ide,QDNET-EAP? Just to verify this fixes the issues...

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 19, 2023

Cool.. seems work 😉

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 19, 2023

@vbreuss Can you check what happens if you change args: --baseline,qodana.sarif.json,--ide,QDNET to args: --baseline,qodana.sarif.json,--ide,QDNET-EAP? Just to verify this fixes the issues...

Yes, it works.
previously it was
image

now it is
image

Will now undo the test...

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 19, 2023

@vbreuss FYI You could just have dropped the commit 😉

@dennisdoomen dennisdoomen merged commit 8b14324 into fluentassertions:develop Nov 19, 2023
5 checks passed
@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 19, 2023

wow.. the qodana scan after this PR on develop 🙈

@dennisdoomen
Copy link
Member

@vbreuss can you please put back that -EAP argument?

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 19, 2023

@vbreuss can you please put back that -EAP argument?

Of course, see #2474

@vbreuss vbreuss deleted the topic/vb/enable-net8 branch November 19, 2023 20:52
@jnyrup jnyrup added testing Testing of Fluent Assertion itself building Building and Infrastructure of Fluent Assertions labels Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Building and Infrastructure of Fluent Assertions testing Testing of Fluent Assertion itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants