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

[new release] yojson (2.1.0) #23717

Merged
merged 2 commits into from
May 2, 2023

Conversation

Leonidas-from-XIV
Copy link
Contributor

Yojson is an optimized parsing and printing library for the JSON format

CHANGES:

2023-04-26

Added

CHANGES:

*2023-04-26*

### Added

- Add `Yojson.Raw.Util` module to provide combinators for extracting fields
  from `Yojson.Raw.t` values. (@tmcgilchrist, ocaml-community/yojson#163)

- Add `Util.path` function to recurse into an object through a list of keys.
  (@cuihtlauac, @Leonidas-from-XIV, ocaml-community/yojson#157)
@kit-ty-kate
Copy link
Member

frama-c seems to be failing due to the new change. Could you have a look and constrain the dependency if that is expected?

# File "src/libraries/utils/json.mll", line 374, characters 8-16:
# Error: This expression has type
#          (string list -> Yojson.Basic.t -> Yojson.Basic.t option,
#           [> `Assoc of (String.t * Yojson.Basic.t) list
#            | `List of Yojson.Basic.t list ]
#           as 'a)
#          Hashtbl.t =
#            (string list -> Yojson.Basic.t -> Yojson.Basic.t option, 'a)
#            Hashtbl.t
#        but an expression was expected of type
#          (Filepath.Normalized.t, Yojson.Basic.t) Hashtbl.t
#        Type string list -> Yojson.Basic.t -> Yojson.Basic.t option
#        is not compatible with type Filepath.Normalized.t 

@Leonidas-from-XIV
Copy link
Contributor Author

Thanks for catching it. I added a constraint on all Frama-C versions that had the constraint 2.0.0 when testing. This was unexpected but indeed the code https://git.frama-c.com/pub/frama-c/-/blob/master/src/libraries/utils/json.mll#L337 uses path as an argument, then opens the Util module (which comes with path since 2.1.0) thus overwriting its own path and adds unexpected things into the Hashtbl.t. Definitely not what should happen.

@bobot maybe you could fix this upstream? There seem to be minor incompatibilities already since the 2.0.0 release.

@kit-ty-kate
Copy link
Member

Thanks!

@kit-ty-kate kit-ty-kate merged commit 4311636 into ocaml:master May 2, 2023
@bobot
Copy link
Contributor

bobot commented May 9, 2023

@Leonidas-from-XIV thank you the fix by @AllanBlanchard will be released in the next version.

@Leonidas-from-XIV Leonidas-from-XIV deleted the release-yojson-2.1.0 branch May 10, 2023 08:37
@Leonidas-from-XIV
Copy link
Contributor Author

Excellent, thanks @bobot and @AllanBlanchard!

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.

3 participants