From 7a5332d886c18911e40e9061ed317b7342deef88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Tue, 20 Oct 2020 10:27:17 +0200 Subject: [PATCH 1/2] Uniformize handling of alias targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- bin/arg.ml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/arg.ml b/bin/arg.ml index 7482bb3f5ae..a7e46e4b7b8 100644 --- a/bin/arg.ml +++ b/bin/arg.ml @@ -48,12 +48,12 @@ module Dep = struct else (1, true) in - let s = String.drop s pos in - let dir, alias = - let path = Stdune.Path.Local.of_string s in - Dune_engine.Alias.Name.parse_local_path (Loc.none, path) - in - Some (recursive, dir, alias) + let s = String_with_vars.make_text Loc.none (String.drop s pos) in + Some + ( if recursive then + Dep_conf.Alias_rec s + else + Dep_conf.Alias s ) let dep_parser = Dune_lang.Syntax.set Stanza.syntax (Active Stanza.latest_version) @@ -61,8 +61,7 @@ module Dep = struct let parser s = match parse_alias s with - | Some (true, dir, name) -> `Ok (alias_rec ~dir name) - | Some (false, dir, name) -> `Ok (alias ~dir name) + | Some dep -> `Ok dep | None -> ( match Dune_lang.Decoder.parse dep_parser Univ_map.empty From 6182ac2a666e106aebe51297b0eb8a50e86200c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Wed, 21 Oct 2020 04:55:38 +0200 Subject: [PATCH 2/2] CHANGES.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 9c0278b2eca..f3872e1dcbe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -52,6 +52,9 @@ Unreleased directory unusable when `$ sudo dune install` modified permissions. (fix #3857, @rgrinberg) +- Fix handling of aliases given on the command line (using the `@` and `@@` + syntax) so as to correctly handle relative paths. (#3874, fixes #3850, @nojb) + 2.7.1 (2/09/2020) -----------------