Skip to content

[PROPOSAL] Dynamic packages #1112

@nholland94

Description

@nholland94

Problem

Currently, dune determines packages that are available to build by looking at .opam files in the root directory. This is a pain point for large repositories which include many packages. It would be nice to be able to dynamically specify packages that are available for a dune project.

Proposed Solution

Instead of loading all packages into a map once at the start of loading a dune project, rewrite package resolution to attempt to build a <package-name>.opam first, then load the package info from that file in the build directory. This would allow dune projects to code generate these files from the root dune project file in whatever manner they wish to.

Alternatively, the root dune project file could have a special entry to specify extra packages available in the project that are not defined by a .opam file. Dune could then generate a .opam file for the specified packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issueGood for contributing for the first time to the Dune codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions