Skip to content

Automatically create opam switch in dune init #11623

@NicholasLYang

Description

@NicholasLYang

Desired Behavior

Add a flag to automatically create an opam switch when initializing a new dune project. Eventually, this could be the default behavior for dune init.

That way, users fall into the pit of success by isolating their dependencies. Otherwise, they run the risk of relying on implicit global dependencies, or breaking other projects when they change dependencies in their current project.

Example

dune init executable my-app --with-switch

Will initialize my-app with a local switch for that folder. Flag name is of course up for debate.

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