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: Upgrade codebase to use BufferHelper instead of conditionally compiling with System.Buffer #131

Open
NightOwl888 opened this issue Jan 2, 2025 · 2 comments
Labels
is:enhancement New feature or request pri:high up for grabs This issue is open to be worked on by anyone
Milestone

Comments

@NightOwl888
Copy link
Owner

System.Buffer is not implemented prior to net46, but we have code that requires both its public and internal methods. A new internal class, J2N.BufferHelper is being implemented in the fix for #117.

We need to migrate all BCL code that uses System.Buffer to J2N.BufferHelper. However, do note that there are no tests for this class, so we will need to rely on it not causing other tests to fail. So, careful attention needs to be paid when switching to each method that none of the tests start failing (both in 32 and 64 bit tests).

@NightOwl888 NightOwl888 added is:enhancement New feature or request pri:high up for grabs This issue is open to be worked on by anyone labels Jan 2, 2025
@NightOwl888 NightOwl888 added this to the 2.2 milestone Jan 2, 2025
@paulirwin
Copy link
Collaborator

Thoughts on dropping the net40 and net45 targets in a major version bump instead? All .NET Framework 4.x versions prior to 4.6.2 have been out of support for at least a few years now.

@NightOwl888
Copy link
Owner Author

Add .NETFramework 4.0 support was submitted by one of our sponsors. They specifically requested that ICU4N have net40 support even though it was already out of support at that time. Given the fact that there has not yet been an RTM release of ICU4N on net40, it seems like doing so would leave them holding the bag.

Good technical decision? No. Good financial decision? Yes.

That being said, I see no reason to support net40 anywhere else.

Most of the methods in BufferHelper were internal in the BCL, anyway. This just isolates them and makes them easier to optimize in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:enhancement New feature or request pri:high up for grabs This issue is open to be worked on by anyone
Projects
None yet
Development

No branches or pull requests

2 participants