Skip to content

Undefined variables are fatal with --locked #6946

@sim642

Description

@sim642

My opam locking issues spree continues...

Supposedly the presence of with-dev-setup in package dependencies shouldn't bother opam 2.1.
However, when building this Dockerfile (at that commit), the command (not directly visible there)

opam switch -y create . --deps-only --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda --locked

fails with

Fatal error: Undefined boolean filter value: with-dev-setup

Apparently the undefined variable becomes fatal with --locked, rather than defaulting to false. This is still the case on opam 2.5.
Reduced test case from @kit-ty-kate:

mkdir /tmp/test && cd /tmp/test && (echo 'opam-version: "2.0"' && echo 'depends: "nope" {with-nope}') > test.opam.locked && opam switch create . --deps-only --locked

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions