From 3bab2f708c1a377618cf575f154cc50abb3d99d2 Mon Sep 17 00:00:00 2001 From: xvw Date: Mon, 8 Jul 2024 14:38:41 +0200 Subject: [PATCH 1/4] Add test for #1794 --- tests/test-dirs/errors/issue1794.t | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/test-dirs/errors/issue1794.t diff --git a/tests/test-dirs/errors/issue1794.t b/tests/test-dirs/errors/issue1794.t new file mode 100644 index 000000000..8c8df56c7 --- /dev/null +++ b/tests/test-dirs/errors/issue1794.t @@ -0,0 +1,27 @@ + $ $MERLIN single errors -filename main.ml -unboxed-types + { + "class": "return", + "value": [ + { + "type": "config", + "sub": [], + "valid": true, + "message": "unknown flag -unboxed-types" + } + ], + "notifications": [] + } + + $ $MERLIN single errors -filename main.ml -no-unboxed-types + { + "class": "return", + "value": [ + { + "type": "config", + "sub": [], + "valid": true, + "message": "unknown flag -no-unboxed-types" + } + ], + "notifications": [] + } From f17f3cfaa7d62e7cccd1e66a67a6a308fecc7710 Mon Sep 17 00:00:00 2001 From: xvw Date: Mon, 8 Jul 2024 14:38:55 +0200 Subject: [PATCH 2/4] Fix #1794 --- src/kernel/mconfig.ml | 8 ++++---- tests/test-dirs/errors/issue1794.t | 18 ++---------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/kernel/mconfig.ml b/src/kernel/mconfig.ml index 55875fa6b..4fdaaacda 100644 --- a/src/kernel/mconfig.ml +++ b/src/kernel/mconfig.ml @@ -457,10 +457,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 index 8c8df56c7..b5ee24a47 100644 --- a/tests/test-dirs/errors/issue1794.t +++ b/tests/test-dirs/errors/issue1794.t @@ -1,27 +1,13 @@ $ $MERLIN single errors -filename main.ml -unboxed-types { "class": "return", - "value": [ - { - "type": "config", - "sub": [], - "valid": true, - "message": "unknown flag -unboxed-types" - } - ], + "value": [], "notifications": [] } $ $MERLIN single errors -filename main.ml -no-unboxed-types { "class": "return", - "value": [ - { - "type": "config", - "sub": [], - "valid": true, - "message": "unknown flag -no-unboxed-types" - } - ], + "value": [], "notifications": [] } From 2fc7e2f364484263e8aa3cdd5dd11095d9dbfbaf Mon Sep 17 00:00:00 2001 From: xvw Date: Mon, 8 Jul 2024 14:40:12 +0200 Subject: [PATCH 3/4] Add CHANGE entry for #1794 --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 957bb63e0..78dcefdb3 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 (#1794) merlin 5.1 ========== From 68c5d3cfd6778aef53425380ec829af64663b712 Mon Sep 17 00:00:00 2001 From: Ulysse <5031221+voodoos@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:12:52 +0200 Subject: [PATCH 4/4] Mention both PR and issue # in changlelog --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 78dcefdb3..00e0ceb77 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +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 (#1794) + - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (#1795, fixes #1794) merlin 5.1 ==========