-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add ref APIs and unit tests for System.Text.Unicode.Utf8 #34538
Add ref APIs and unit tests for System.Text.Unicode.Utf8 #34538
Conversation
Was this API reviewed? Can you share the issue? Thanks. |
@stephentoub This particular API has not yet been approved. We reviewed related APIs (the In the meeting notes it was said that |
How does this IsWellFormedSequence work for WebSockets? This appears to not be stateful from one request to another, but the web sockets case requires being able to support carry over from one packet to the next. |
In general we ask people not to submit PRs until APIs are reviewed. When is it going to be reviewed? |
src/System.Runtime/tests/System/Text/Unicode/Utf8Tests.netcoreapp.cs
Outdated
Show resolved
Hide resolved
src/System.Runtime/tests/System/Text/Unicode/Utf8Tests.netcoreapp.cs
Outdated
Show resolved
Hide resolved
src/System.Runtime/tests/System/Text/Unicode/Utf8Tests.netcoreapp.cs
Outdated
Show resolved
Hide resolved
@stephentoub I was thinking that WebSockets would use something along the lines of the type https://github.com/dotnet/corefxlab/blob/master/src/System.Text.Primitives/System/Text/Encoders/Utf8Validator.cs, which would use |
Ok, thanks. This is why starting with the API review is useful. It's not clear to me how that gets built on top of this public API as is, or if a different API is needed for that called-out use case then what this API is useful for, and a PR isn't really a good place to design the APIs. |
8ce0d21
to
8391452
Compare
Pushed a new iteration that has the unit tests for The unit tests are basically complete at this point. The only thing that remains is to figure out what should be exposed via the ref assemblies, per @stephentoub's comment. We had an API review the other day for I'll also delete the |
@GrabYourPitchforks what is status of this PR? There seems to be no update for last 4 weeks. |
@karelz The corresponding coreclr PR is held up in review (and partially blocked by https://github.com/dotnet/coreclr/pull/2251, on which I've been working offline with Jan for the past while). This corefx PR is essentially finished but cannot be committed until those prereqs are committed to coreclr. |
If the prereqs are more than 1-2 weeks out, let's close this PR to avoid "bugging us" ;) |
@GrabYourPitchforks any update on ETA? |
8391452
to
2f0c80c
Compare
@karelz As soon as CI passes it's going in. Thanks for keeping on me for this. :) |
I need to make a quick fix: The out parameters should have the num prefix dropped. We don't use that prefix in our other APIs like |
Unit tests are passing even though Helix seems to be having a bad day. |
…fx#34538) Also provides the implementation of BoundedMemory for checking for buffer overruns during unit testing Commit migrated from dotnet/corefx@cd3936e
These are the unit tests and
System.Runtime
refasm changes for dotnet/coreclr#21948.The
BoundedMemory
type (for internal unit test use) is a slightly improved and simplified version of the AppVerifier-like code introduced into corefxlab at dotnet/corefxlab#1881. It provides a framework for testing unsafe C# code to make sure the code under test doesn't read outside the bounds of the allowed buffers.