Skip to content

Commit

Permalink
Fix hint message for 'data_only_dirs' that wrongly mentions the unkno…
Browse files Browse the repository at this point in the history
…wn constructor 'data_only'.

Signed-off-by: Michele Alberti <michele.alberti@cea.fr>
  • Loading branch information
lambdaxdotx committed Jun 2, 2022
1 parent b308e95 commit b04595e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Unreleased
----------

- Fix hint message for ``data_only_dirs`` that wrongly mentions the unknown
constructor ``data_only`` (#5803, @lambdaxdotx)

- Fix creating sandbox directory trees by getting rid of buggy memoization
(@5794, @rgrinberg, @snowleopard)

Expand Down
2 changes: 1 addition & 1 deletion src/dune_engine/sub_dirs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ let decode =
let data_only_dirs =
located
(Dune_lang.Syntax.since Stanza.syntax (1, 6)
>>> strict_subdir_glob "data_only")
>>> strict_subdir_glob "data_only_dirs")
in
let vendored_dirs =
(* let decode = Predicate_lang.Glob.decode in *)
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/vendor/main.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The current directory cannot be marked as data-only
1 | (data_only_dirs .)
^
Error: invalid sub-directory name "."
Hint: did you mean (data_only *)?
Hint: did you mean (data_only_dirs *)?
[1]

Only direct subdirectories can be marked as vendored
Expand All @@ -81,7 +81,7 @@ Only direct subdirectories can be marked as data-only
1 | (data_only_dirs a/b/c)
^^^^^
Error: only immediate sub-directories may be specified.
Hint: to ignore a/b/c, write "(data_only c)" in a/b/dune
Hint: to ignore a/b/c, write "(data_only_dirs c)" in a/b/dune
[1]

Multiple direct subdirectories can be marked as data-only or vendored
Expand Down

0 comments on commit b04595e

Please sign in to comment.