-
Notifications
You must be signed in to change notification settings - Fork 470
[PROPOSAL] Dynamic packages #1112
Description
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.