Skip to content

Back-fix FluentReverse for .NET Framework & drop test targets with no breaking changes.#1487

Draft
ha-ves wants to merge 3 commits intosipsorcery-org:masterfrom
ha-ves:net10
Draft

Back-fix FluentReverse for .NET Framework & drop test targets with no breaking changes.#1487
ha-ves wants to merge 3 commits intosipsorcery-org:masterfrom
ha-ves:net10

Conversation

@ha-ves
Copy link
Copy Markdown
Contributor

@ha-ves ha-ves commented Jan 9, 2026

The arrays from .NET Framework dependencies (System.Memory) is using arrays which does not have the new FluentReverse implementation.

This is a shorter fix than decorating with #ifs.


Copilot:

This pull request introduces a new utility method for reversing arrays in a fluent style and updates the test project target frameworks by removing support for .NET 9.0. The most significant changes are the addition of the FluentReverse extension method for arrays and the cleanup of test project configurations.

New utility method

  • Added FluentReverse<T> extension method to arrays in TypeExtensions, allowing fluent-style reversal using LINQ's Reverse() (src/sys/TypeExtensions.cs).
  • Added using System.Linq; to support the new extension method (src/sys/TypeExtensions.cs).

Test project configuration updates

  • Removed .NET 9.0 from the target frameworks in SIPSorcery.IntegrationTests.csproj to only support .NET 462, .NET 8.0, and .NET 10.0 (test/integration/SIPSorcery.IntegrationTests.csproj).
  • Removed .NET 9.0 from the target frameworks in SIPSorcery.UnitTests.csproj (test/unit/SIPSorcery.UnitTests.csproj).

ha-ves and others added 3 commits November 15, 2025 01:28
* Use 'latest' C# language version
* TFM conditional compilation
* update packages
* additional extensions
* drop net9 from test projects
@paulomorgado
Copy link
Copy Markdown
Contributor

Why is this FluentReverse needed at all?

There's a lot of unnecessary reversing going on here. Have a look at #1434, where there's no reverses going on.

@ha-ves
Copy link
Copy Markdown
Contributor Author

ha-ves commented Jan 16, 2026

@paulomorgado
Why is this FluentReverse needed at all?

It was the path of least resistance for initial upgrade step.

As for the issue in this PR, for some reason it's fine with dotnet sdk 10, but not when I used dotnet sdk 9.

I'm reverting to draft for this PR, because the code changes will be minimal, just removing TargetFrameworks..., and in CI I think we choose to only test for latest framework anyway...
I don't have anything to send for .NET 10 yet.

I'm also not sure about the performance tag, or maybe I'll also update the actions files to be same as the ubuntu one.
Let me know what you think @sipsorcery

@ha-ves ha-ves marked this pull request as draft January 16, 2026 06:23
@sipsorcery
Copy link
Copy Markdown
Member

@ha-ves is the new method needed for a subsequent PR? If so it'd be better to include it at that time. RIght now it's an orphaned method that's never used.

@paulomorgado
Copy link
Copy Markdown
Contributor

@ha-ves

As for the issue in this PR, for some reason it's fine with dotnet sdk 10, but not when I used dotnet sdk 9.

Why would you want to use .NET SDK 9?

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.

3 participants