From 0c43c789fe540705e3eabfd12845369f3b84ae85 Mon Sep 17 00:00:00 2001 From: Arseniy Alekseyev Date: Thu, 17 Dec 2020 12:21:14 +0000 Subject: [PATCH 1/2] fix a bug in configurator String.take Signed-off-by: Arseniy Alekseyev --- otherlibs/configurator/src/import.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otherlibs/configurator/src/import.ml b/otherlibs/configurator/src/import.ml index fb9b432562b..df481f17510 100644 --- a/otherlibs/configurator/src/import.ml +++ b/otherlibs/configurator/src/import.ml @@ -170,7 +170,7 @@ module String = struct include StringLabels module Map = Map (String) - let take s i = sub s ~pos:0 ~len:(max i (String.length s)) + let take s i = sub s ~pos:0 ~len:(min i (String.length s)) let drop s n = let len = length s in From 6b9acb8690d70e1580bea447897e998e99d3e93d Mon Sep 17 00:00:00 2001 From: Arseniy Alekseyev Date: Thu, 17 Dec 2020 17:32:02 +0000 Subject: [PATCH 2/2] changelog entry Signed-off-by: Arseniy Alekseyev --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 8059d741edd..f4279edd7c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -103,6 +103,9 @@ Unreleased useless and deprecated. Dune now conflicts with `merlin < 3.4.0` and `ocaml-lsp-server < 1.3.0` (#3554, @voodoos) +- Configurator: fix a bug introduced in 2.6.0 where the configurator V1 API doesn't work at + all when used outside of dune. (#4046, @aalekseyev) + 2.7.1 (2/09/2020) -----------------