From b86bb3bada825c7726911e0ea842b2c393872545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Wed, 25 Sep 2024 12:30:09 +0200 Subject: [PATCH] [B] #1795: Fix #1794: Add `-unboxed-types` and `-no-unboxed-types` to ignored flags --- CHANGES.md | 1 + src/kernel/mconfig.ml | 8 ++++---- tests/test-dirs/errors/issue1794.t | 13 +++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 tests/test-dirs/errors/issue1794.t diff --git a/CHANGES.md b/CHANGES.md index bedae6d5c..3595a0459 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ unreleased + merlin binary - A new `WRAPPING_PREFIX` configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (#1788) + - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (#1795, fixes #1794) merlin 4.16 =========== diff --git a/src/kernel/mconfig.ml b/src/kernel/mconfig.ml index 5842d1cfe..44d79f8f6 100644 --- a/src/kernel/mconfig.ml +++ b/src/kernel/mconfig.ml @@ -428,10 +428,10 @@ let ocaml_ignored_flags = [ "-noautolink"; "-no-check-prims"; "-nodynlink"; "-no-float-const-prop"; "-no-keep-locs"; "-no-principal"; "-no-rectypes"; "-no-strict-formats"; "-no-strict-sequence"; "-no-unbox-free-vars-of-clos"; - "-no-unbox-specialised-args"; "-O2"; "-O3"; "-Oclassic"; "-opaque"; - "-output-complete-obj"; "-output-obj"; "-p"; "-pack"; - "-remove-unused-arguments"; "-S"; "-shared"; "-unbox-closures"; "-v"; - "-verbose"; "-where"; + "-no-unbox-specialised-args"; "-no-unboxed-types"; "-O2"; "-O3"; + "-Oclassic"; "-opaque"; "-output-complete-obj"; "-output-obj"; "-p"; "-pack"; + "-remove-unused-arguments"; "-S"; "-shared"; "-unbox-closures"; + "-unboxed-types"; "-v"; "-verbose"; "-where"; ] let ocaml_ignored_parametrized_flags = [ diff --git a/tests/test-dirs/errors/issue1794.t b/tests/test-dirs/errors/issue1794.t new file mode 100644 index 000000000..b5ee24a47 --- /dev/null +++ b/tests/test-dirs/errors/issue1794.t @@ -0,0 +1,13 @@ + $ $MERLIN single errors -filename main.ml -unboxed-types + { + "class": "return", + "value": [], + "notifications": [] + } + + $ $MERLIN single errors -filename main.ml -no-unboxed-types + { + "class": "return", + "value": [], + "notifications": [] + }