Skip to content

pkg: Add CLI interface for enabling and disabling package management during single command executions #12819

@shonfeder

Description

@shonfeder

Motivation

Currently the only way to enable package management requires a change on disk. I.e., either

  • creating a lock directory
  • writing configurations in the dune-workspace

However, there are cases where a user may want to enable or disable package management temporarily, from the CLI. E.g.,

In such cases, it would be convenient to be able to run a dune command with package management enabled (or disabled).

Interface ideas

A possible interfaces to consider (I am not attached to any particular interface):

Via env var

DUNE_PKG=1 dune build # enabled
DUNE_PKG=0 dune build # disabled
DUNE_PKG=  dune build # will run with the default behavior given the file systems

This should apply to any other relevant subcommands.

Via flag

dune build --pkg=enabled  # enabled
dune build --pkg=disabled # disabled
dune build                # will run with the default behavior given the file system

This should apply to any other relevant subcommands.

Metadata

Metadata

Assignees

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