Skip to content

Regression in #11028 when using dune subst on a project with an opam file #11045

@btjorge

Description

@btjorge

I got notified of the closing of #10927, so I tried to test my opam file pin use-case, but the build failed with an error. Here's a reproduction test without opam :

Reproduction

$ mkdir test && cd test

$ cat > dune-project << EOF
(lang dune 3.17)
(name test)
(version 0.1)
(generate_opam_files)
(package (name test) (allow_empty))
EOF

$ dune build # generates the opam file

Previous Behavior

$ dune subst # does not fail

Actual Behavior

$ dune subst 
File "test.opam", line 1, characters 10-25:
1 | # This file is generated by dune, edit dune-project instead
              ^^^^^^^^^^^^^^^
Error: repository does not contain any version information

Note that the substitution works has expected

Specifications

  • dune from main branch

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions