Skip to content

Failure of [coqc --config] with Coq in a workspace #11011

@rlepigre

Description

@rlepigre

Variable expansion based on the output of coqc --config, such as %{coq:version.major}, is broken when Coq itself is in the workspace. This leads to errors like the following:

Error: Could not expand %{coq:version.minor} as running coqc --config failed

The reason making coqc fail is that it does not know where to find the standard library.

This can be reproduced using the following:

mkdir workspace_bug
cd workspace_bug

echo "(lang dune 3.8)" > dune-workspace

git clone [email protected]:coq/coq.git

mkdir test
echo "(rule (action (with-outputs-to coq-version.txt (echo \"%{coq:version.major}\"))))" > test/dune

dune build test

CC @ejgallego @Alizter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions