Skip to content

Default behaviour of opam file retrieval for local pin on VCS directory #6418

@rjbou

Description

@rjbou

The current behaviour of opam is to retrieve the uncommitted opam file when a package is vcs-pinned on a local directory (automatic kind detection or specific via cli).

Some history, from #3403, it seems that the default behaviour of opam 1.2 was to path pin, and opam 2.0 introduced the VCS pin detection, leading to no more take the uncommitted modification of the opam file (the issue itself). To "fix" that, #3404 was opened, introducing the "magic" of retrieving the opam file on disk, committed or not. This behaviour was updated and fixed over the time (#3499, #4300, #4876, until today #6409 - and maybe others).

Discussion in the PR (#6409 (comment)) and in dev meeting, we are considering removing the magic the permit to retrieve uncommitted opam files.

This would be a change of default behaviour, we discussed some "safeguards":

  • a note to tell users that the uncommitted changes in opam file are not taken
  • it is always possible to have uncommitted opam file handled using --working-dir, or even consider a path pin (CI?)

This issue is created to continue the discussion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions