diff --git a/Changes.md b/Changes.md index 197d424d7..d1eb397fa 100644 --- a/Changes.md +++ b/Changes.md @@ -65,6 +65,9 @@ Unreleased - A new alert `melsend` has been added to the PPX (which warns by default) and can be turned into an error with `melange.ppx -alert ++melsend` once [ocaml/dune#11234](https://github.com/ocaml/dune/pull/11234) lands. +- core: fix a crash related to finding constructor names in pattern matching triggered by dune's earlier implementation of `(implicit_transitive_deps false)` + ([#1238](https://github.com/melange-re/melange/pull/1238), + [#1262](https://github.com/melange-re/melange/pull/1262)) 4.0.1 2024-06-07 --------------- diff --git a/jscomp/core/matching_polyfill.cppo.ml b/jscomp/core/matching_polyfill.cppo.ml index 45043a270..70b057774 100644 --- a/jscomp/core/matching_polyfill.cppo.ml +++ b/jscomp/core/matching_polyfill.cppo.ml @@ -56,6 +56,7 @@ let names_from_construct_pattern in let rec resolve_path n path = match Env.find_type path pat.pat_env with + | exception Not_found -> None | { type_kind = Type_variant (cstrs, _repr); _ } -> names_from_type_variant cstrs | { type_kind = diff --git a/test/blackbox-tests/persistent-structure-error.t b/test/blackbox-tests/persistent-structure-error.t index 76d2ed77d..6877bd449 100644 --- a/test/blackbox-tests/persistent-structure-error.t +++ b/test/blackbox-tests/persistent-structure-error.t @@ -26,8 +26,3 @@ The issue seems to happen due to a combination of two things: $ melc --bs-package-output inner -o inner/inner.cmj -c inner/inner.ml $ melc -I inner --bs-package-output outer -o outer/outer.cmj -c outer/outer.ml --bs-stop-after-cmj $ melc -I outer --bs-package-output . -o main.cmj -c main.ml --bs-stop-after-cmj - melc: internal error, uncaught exception: - Not_found - - [125] -