Skip to content

.opam-switch/environment file format is ambiguous and can lead to errors #4325

@lefessan

Description

@lefessan

Currently, the .opam-switch/environment file is wrongly parsed by opam when the value of a variable is empty:

If my file is

CPP     =               Updated\ by\ package\ ocaml-base-compiler

CPP will wrongly be set to Updated by package ocaml-base-compiler. This will prevent creating another switch after eval $(opam env) because ocaml will fail to compile with a wrong CPP var.

An immediate fix should be to stop writing these "Updated by package $name" comments. A long-term fix should be to use a more standard format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions