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

Upstreaming plan #3

Closed
dbuenzli opened this issue Sep 24, 2021 · 3 comments
Closed

Upstreaming plan #3

dbuenzli opened this issue Sep 24, 2021 · 3 comments

Comments

@dbuenzli
Copy link
Owner

dbuenzli commented Sep 24, 2021

I have now added tests. In test.ml we ensure that all uchars codec according to spec and a few other tidbits. In test_long.ml I have a longer test (~8min on my machine) that ensures we do not decode invalid byte sequences to any uchar, I don't think people want that in the test suite…

In any case I think an upstreaming PR sequence could be:

  1. Make a PR for Bytes and Uchar with the codec.
  2. Make a PR for String.
  3. Make a PR to make Buffer use the Bytes encoders.

The day Bigarray.Bytes exists I'll happily make a PR to add them there aswell ;-)

What do you think @gasche @nojb ?

P.S. I'll have to switch to something else in the upcoming days, I hope to be able to get back to it at latest by mid october.

@nojb
Copy link

nojb commented Sep 25, 2021

Sounds good! Personally I think doing 1. and 2. together would be OK as the implementation for String should be a trivial wrapping around that of Bytes.

@dbuenzli
Copy link
Owner Author

dbuenzli commented Sep 25, 2021

Sounds good! Personally I think doing 1. and 2. together would be OK as the implementation for String should be a trivial wrapping around that of Bytes.

Yeah I just want to avoid c&p churn in case there is still discussion on names and doc strings. (Working on this already took me much more time than I expected…)

@dbuenzli
Copy link
Owner Author

In the end did 1. and 2. together which is now merged.

For reference here are all the PRs:

ocaml/ocaml#10710
ocaml/ocaml#10733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants