Ocelot
Ocelot copied to clipboard
.NET 9 update will break one of the tests because of a new `TrimStart` overload
Expected Behavior / New Feature
Updating to .NET 9 is easy.
Actual Behavior / Motivation for New Feature
Updating to .NET 9 will cause the GetServiceVersion_HasTags_HappyPath to fail, because a new TrimStart overload was added that takes priority over https://github.com/ThreeMammals/Ocelot/blob/19a8e2f8b3e773fbe962a56fc2e7067b6b19132b/src/Ocelot/Infrastructure/Extensions/StringExtensions.cs#L5
See https://github.com/dotnet/runtime/issues/103892
Steps to Reproduce the Problem
Update to .NET 9. Run tests.
Specifications
- Version:
- Platform:
- Subsystem:
Hello Andy, Thank you for bringing this humorous issue to our attention! Rest assured, we will address it and rename the extension method accordingly while migrating Ocelot to .NET 9 in November'24.
@raman-m Whaaaat? 😸
@raman-m I think it's premature to plan a migration to net 9, it's still in preview, I think it would be wise to wait for a 9.0.1 or 9.0.2 in January or February.
@RaynaldM
I think it would be wise to wait for a 9.0.1 or 9.0.2 in January or February.
Are you referring to 9.1.0 or 9.2.0? 😄 By January/February '25, we'll certainly be on versions 9.1.0+. 🤣 All jokes aside, I believe we should migrate to .NET 9 immediately following the major release, which will also enable Ocelot users to transition. This upgrade is important because it will allow us to:
- eliminate targets for
net6.0andnet7.0 - introduce a new
net9.0target alongsidenet8.0
I plan to start the migration within a week (Nov 15-20) following the .NET 9.0 release on November 12, 2024.
.NET Runtime
In the .NET codebase, we have the following extensions: Search for TrimStart. It is advisable to move away from this name, thus renaming the method in Ocelot is necessary.