From 2471c60beb61f753a93596d9ae7e5fcc3e6a62c7 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 17 May 2024 15:32:51 +0200 Subject: [PATCH] Update some dependencies - more recent sedlex fixes a bug that needed a workaround in our code - we need recent dates_calc to avoid extra runtime dependency on `Str` that our build system won't handle --- catala.opam | 4 ++-- compiler/surface/lexer.cppo.ml | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/catala.opam b/catala.opam index 4650932f..ac9ac008 100644 --- a/catala.opam +++ b/catala.opam @@ -22,7 +22,7 @@ depends: [ "bindlib" {>= "6.0"} "cmdliner" {>= "1.1.0"} "cppo" {>= "1"} - "dates_calc" {>= "0.0.4"} + "dates_calc" {>= "0.0.6"} "dune" {>= "3.11"} "js_of_ocaml-ppx" {= "4.1.0"} "menhir" {>= "20200211"} @@ -31,7 +31,7 @@ depends: [ "ocamlfind" {!= "1.9.5"} "ocamlgraph" {>= "1.8.8"} "re" {>= "1.10"} - "sedlex" {>= "2.4"} + "sedlex" {>= "3.1"} "uutf" {>= "1.0.3"} "ubase" {>= "0.05"} "unionFind" {>= "20220109"} diff --git a/compiler/surface/lexer.cppo.ml b/compiler/surface/lexer.cppo.ml index 9e0ac90a..d325c6fb 100644 --- a/compiler/surface/lexer.cppo.ml +++ b/compiler/surface/lexer.cppo.ml @@ -778,9 +778,6 @@ let lex_raw (lexbuf : lexbuf) : token = | _ -> ( (* Nested match for lower priority; `_` matches length 0 so we effectively retry the sub-match at the same point *) - let lexbuf = lexbuf in - (* workaround sedlex bug, see https://github.com/ocaml-community/sedlex/issues/12 - (fixed in 3.1) *) match%sedlex lexbuf with | Star (Compl '\n'), ('\n' | eof) -> LAW_TEXT (Utf8.lexeme lexbuf) | _ -> L.raise_lexer_error (Pos.from_lpos prev_pos) prev_lexeme) @@ -817,9 +814,6 @@ let lex_law (lexbuf : lexbuf) : token = | _ -> ( (* Nested match for lower priority; `_` matches length 0 so we effectively retry the sub-match at the same point *) - let lexbuf = lexbuf in - (* workaround sedlex bug, see https://github.com/ocaml-community/sedlex/issues/12 - (fixed in 3.1) *) match%sedlex lexbuf with | Star (Compl '\n'), ('\n' | eof) -> LAW_TEXT (Utf8.lexeme lexbuf) | _ -> L.raise_lexer_error (Pos.from_lpos prev_pos) prev_lexeme)