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] mustache (3.2.0) #24839

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Conversation

psafont
Copy link
Contributor

@psafont psafont commented Nov 24, 2023

Mustache logic-less templates in OCaml

CHANGES:

@psafont
Copy link
Contributor Author

psafont commented Nov 24, 2023

Investigating the devreps breaking to see if it's expected or needs fixing:

# File "src/autoindex.ml", line 126, characters 4-35:
# 126 |   | Mustache_types.Missing_variable s | Mustache_types.Missing_section s | Mustache_types.Missing_partial s ->
#           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound constructor Mustache_types.Missing_variable

It's expected: rgrinberg/ocaml-mustache@bf3ad00

Will add the upper bound in soupalt

@psafont
Copy link
Contributor Author

psafont commented Nov 24, 2023

All revdeps pass, all the failures left are due to soupault, unrelated to mustache

Copy link
Collaborator

@haochenx haochenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me except for the tiny cosmetic change suggested.

All CI failures are unrelated to this PR as stated in #24839 (comment)

All revdeps pass, all the failures left are due to soupault, unrelated to mustache

packages/mustache/mustache.3.2.0/opam Outdated Show resolved Hide resolved
"Gabriel Scherer <gabriel.scherer@gmail.com>"
]
license: "MIT"
homepage: "https://github.com/rgrinberg/ocaml-mustache"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(triage note) it seems that the doc link (http://rgrinberg.github.io/mustache/) is removed. it's likely intentional since the link is now 404

@mseri
Copy link
Member

mseri commented Nov 27, 2023

@psafont can you remove the bound on soupault? I think Re was transitively inherited from some other package. I will look into that separately

@psafont
Copy link
Contributor Author

psafont commented Nov 28, 2023

can you remove the bound on soupault?

I added the bound because this version of mustache has breaking changes and breaks those versions of soupault. Is this not standard practise anymore?

CHANGES:

* Remove the AST without locations: now all functions build an AST with locations;
  in particular, parsing always provide located error messages.
  To ease backward-compatibility, the smart constructors still use the
  same interface, using dummy locations by default, with
  a With_locations module for users who wish to explicitly provide
  locations.
  (@gasche, rgrinberg/ocaml-mustache#65)
* Support for "template inheritance" (partials with parameters)
  `{{<foo}} {{$param1}}...{{/param1}} {{$param2}}...{{/param2}} {{/foo}`
  following the widely-implemented semi-official specification
    mustache/spec#75
  (@gasche, 58)
* Partials are now supported in the `mustache` command-line tool (@gasche, rgrinberg/ocaml-mustache#57)
  They are interpreted as template inclusion: "{{>foo/bar}}" will include
  "foo/bar.mustache", relative to the current working directory.
* Improve error messages (@gasche, rgrinberg/ocaml-mustache#47, rgrinberg/ocaml-mustache#51, rgrinberg/ocaml-mustache#56)
  Note: the exceptions raised by Mustache have changed, this breaks
  compatibility for users that would catch and deconstruct existing
  exceptions.
* Add `render_buf` to render templates directly to buffers (@gasche, rgrinberg/ocaml-mustache#48)
* When a lookup fails in the current context, lookup in parents contexts.
  This should fix errors when using "{{#foo}}" for a scalar variable
  'foo' to check that the variable exists.
  (@gasche, rgrinberg/ocaml-mustache#49)
mustache 3.2.0 contains breaking changes
@mseri
Copy link
Member

mseri commented Nov 28, 2023

Oh sorry for wasting your time and thanks. I thought it was for the Re failure in the lower bounds, my bad. I will add them back manually.

@psafont
Copy link
Contributor Author

psafont commented Nov 28, 2023

I had the changeset prepared just in case ;)

@mseri mseri merged commit 5cc54a5 into ocaml:master Nov 28, 2023
1 of 2 checks passed
@mseri
Copy link
Member

mseri commented Nov 28, 2023

Thanks a lot!

@psafont psafont deleted the release-mustache-v3.2.0 branch November 28, 2023 13:47
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.

None yet

3 participants