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

Task: Remove ISpanFormattable because it will cause collisions on .NET Standard #130

Open
NightOwl888 opened this issue Jan 2, 2025 · 0 comments
Labels
is:bug Something isn't working notes:breaking-change Has changes that will break backward compatibility pri:high
Milestone

Comments

@NightOwl888
Copy link
Owner

The ISpanFormattable interface was copied from the BCL. This causes problems when using the netstandard2.1 target from net6.0 because both places define the same interface (in the System namespace).

So, instead of redefining the ISpanFormattable interface to optimize number formatting, callers can use Number on .NET Standard and .NET Framework, since it also defines the TryFormat() method. However, these older platforms have no TryFormat() method on any of the numeric value types,

Internally, we can generally patch this up by using the static TryFormat() methods directly. Both internally and publicly, we can support J2N numeric reference types by casting to J2N.Numerics.Number.

@NightOwl888 NightOwl888 added is:bug Something isn't working pri:high notes:breaking-change Has changes that will break backward compatibility labels Jan 2, 2025
@NightOwl888 NightOwl888 added this to the 3.0 milestone Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working notes:breaking-change Has changes that will break backward compatibility pri:high
Projects
None yet
Development

No branches or pull requests

1 participant