ThreeMammals / Ocelot

.NET API Gateway
https://www.nuget.org/packages/Ocelot
MIT License
8.37k stars 1.64k forks source link

.NET 9 update will break one of the tests because of a new `TrimStart` overload #2145

Open AndyAyersMS opened 2 months ago

AndyAyersMS commented 2 months ago

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

raman-m commented 2 months ago

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.

ggnaegi commented 1 month ago

@raman-m Whaaaat? 😸

RaynaldM commented 1 month ago

@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.

raman-m commented 1 month ago

@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:

I plan to start the migration within a week (Nov 15-20) following the .NET 9.0 release on November 12, 2024.