Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.17] backport 11204 - remove errors message from dune subst with empty dir #11216

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/subst.ml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ let subst vcs =
|> Memo.return)
in
Some (None, None, Path.Source.Set.to_list files))
>>| Option.bind ~f:(fun ((_, _, files) as s) ->
match files with
| [] -> None
| _ :: _ -> Some s)
>>= Memo.Option.iter ~f:(fun (version, commit, files) ->
let+ (dune_project : Dune_project.t) =
(* CR-soon rgrinberg: unify this check with the above version check *)
Expand Down
2 changes: 2 additions & 0 deletions doc/changes/11204.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Remove useless error message when running `$ dune subst` in empty projects.
(@rgrinberg, #11204, fixes #11200)
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/github11200.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Running `dune subst` should succeed in an empty directory.
Regression test for https://github.com/ocaml/dune/issues/11200

$ dune subst
Loading