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

dune subst issues with OCaml-CI #11290

Open
mtelvers opened this issue Jan 14, 2025 · 0 comments
Open

dune subst issues with OCaml-CI #11290

mtelvers opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@mtelvers
Copy link

mtelvers commented Jan 14, 2025

Expected Behavior

Up to Dune 3.16.1, dune subst (invoked by opam), in an directory containing just an .opam file completed without error. Since 3.17 an error is returned.

This issue relates to #11200, which was fixed by #11204, however, the two cases are different as #11200 covered completely empty directories by filtering them out, but this has not fixed OCaml-CI as OCaml-CI populates the directories with .opam files.

Actual Behavior

$ dune subst
File ".", line 1, characters 0-0:
Error: There is no dune-project file in the current directory, please add one
with a (name <name>) field in it.
Hint: 'dune subst' must be executed from the root of the project.

Reproduction

3.16

$ mkdir dune-subst
$ cd dune-subst/
$ echo 'authors: [ "John Doe <[email protected]>" ]' > foo.opam
$ dune --version
3.16.0
$ dune subst
$ echo $?
0

3.17.1

$ mkdir dune-subst
$ cd dune-subst/
$ echo 'authors: [ "John Doe <[email protected]>" ]' > foo.opam
$ dune --version
3.17.1
$ dune subst
File ".", line 1, characters 0-0:
Error: There is no dune-project file in the current directory, please add one
with a (name <name>) field in it.
Hint: 'dune subst' must be executed from the root of the project.

Specifications

  • Version of dune (output of dune --version): >= 3.17.0
  • Version of ocaml (output of ocamlc --version): 4.14.2
  • Operating system (distribution and version): Ubuntu 22.04.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants