Skip to content

Conversation

Leonidas-from-XIV
Copy link
Member

It seems like the length reported by the channel and the one that really_read expects do not match when some line ending translation is happening. Thus try to avoid the translation.

@Leonidas-from-XIV Leonidas-from-XIV marked this pull request as ready for review April 25, 2025 13:49
It seems like the length reported by the channel and the one that
`really_read` expects do not match when some line ending translation is
happening. Thus try to avoid the translation.
Technically it might even work on OCaml versions from before
`String.split_on_char` but that is becoming less relevant and in any
case isn't tested.
@Leonidas-from-XIV Leonidas-from-XIV merged commit e3832e6 into ocaml-community:master May 29, 2025
3 checks passed
@Leonidas-from-XIV Leonidas-from-XIV deleted the windows-test-fix branch May 29, 2025 13:40
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request May 29, 2025
CHANGES:

*2025-05-39*

### Changed

- Floats are now always output to JSON in a standard-conformant way or not at
  all (raising an exception). This makes the `std` variants of functions
  identical to the non-`std` variants and the `std` arguments have no effect.
  Users are encouraged to switch to the non-`std` affixed variants, the others
  will be deprecated in the future.  (ocaml-community/yojson#184, @Leonidas-from-XIV)
- Bumped the minimum required version of OCaml for the main package to 4.08
  since the CI dropped the support. This however allows removing the dependency
  on the `seq` library, so the depencency cone becomes slightly smaller. (ocaml-community/yojson#194,
  @Leonidas-from-XIV)

### Fixed

- Fixed handling of escape sequences in JSON5. Known escapes like \b will be
  properly unescaped and undefined escape sequences will unescape to the
  character itself as per spec (ocaml-community/yojson#187, @david-maison-TrustInSoft)
- Fixed tests failing on Windows due to disagreements with the length of an
  input channel and the text mode conversion (ocaml-community/yojson#192, @Leonidas-from-XIV)

### Removed

- Removed support for Tuple and Variant in JSON. It was a non-standard
  extension that was rarely used, so this simplifies the Yojson types and the
  parser more standard-conforming (ocaml-community/yojson#105, ocaml-community/yojson#158, ocaml-community/yojson#185 @Leonidas-from-XIV)
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request Jun 2, 2025
CHANGES:

*2025-05-39*

### Changed

- Floats are now always output to JSON in a standard-conformant way or not at
  all (raising an exception). This makes the `std` variants of functions
  identical to the non-`std` variants and the `std` arguments have no effect.
  Users are encouraged to switch to the non-`std` affixed variants, the others
  will be deprecated in the future.  (ocaml-community/yojson#184, @Leonidas-from-XIV)
- Bumped the minimum required version of OCaml for the main package to 4.08
  since the CI dropped the support. This however allows removing the dependency
  on the `seq` library, so the depencency cone becomes slightly smaller. (ocaml-community/yojson#194,
  @Leonidas-from-XIV)

### Fixed

- Fixed handling of escape sequences in JSON5. Known escapes like \b will be
  properly unescaped and undefined escape sequences will unescape to the
  character itself as per spec (ocaml-community/yojson#187, @david-maison-TrustInSoft)
- Fixed tests failing on Windows due to disagreements with the length of an
  input channel and the text mode conversion (ocaml-community/yojson#192, @Leonidas-from-XIV)

### Removed

- Removed support for Tuple and Variant in JSON. It was a non-standard
  extension that was rarely used, so this simplifies the Yojson types and the
  parser more standard-conforming (ocaml-community/yojson#105, ocaml-community/yojson#158, ocaml-community/yojson#185 @Leonidas-from-XIV)
dkalinichenko-js pushed a commit to dkalinichenko-js/opam-repository that referenced this pull request Jun 10, 2025
CHANGES:

*2025-05-39*

### Changed

- Floats are now always output to JSON in a standard-conformant way or not at
  all (raising an exception). This makes the `std` variants of functions
  identical to the non-`std` variants and the `std` arguments have no effect.
  Users are encouraged to switch to the non-`std` affixed variants, the others
  will be deprecated in the future.  (ocaml-community/yojson#184, @Leonidas-from-XIV)
- Bumped the minimum required version of OCaml for the main package to 4.08
  since the CI dropped the support. This however allows removing the dependency
  on the `seq` library, so the depencency cone becomes slightly smaller. (ocaml-community/yojson#194,
  @Leonidas-from-XIV)

### Fixed

- Fixed handling of escape sequences in JSON5. Known escapes like \b will be
  properly unescaped and undefined escape sequences will unescape to the
  character itself as per spec (ocaml-community/yojson#187, @david-maison-TrustInSoft)
- Fixed tests failing on Windows due to disagreements with the length of an
  input channel and the text mode conversion (ocaml-community/yojson#192, @Leonidas-from-XIV)

### Removed

- Removed support for Tuple and Variant in JSON. It was a non-standard
  extension that was rarely used, so this simplifies the Yojson types and the
  parser more standard-conforming (ocaml-community/yojson#105, ocaml-community/yojson#158, ocaml-community/yojson#185 @Leonidas-from-XIV)
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

Successfully merging this pull request may close these issues.

1 participant