Skip to content

[RFC] Installable directories #1868

Closed
Closed
@rgrinberg

Description

@rgrinberg

Problem

Installing generated documentation is quite problematic with the current install stanzas. The issue is that the documentation is generated by tools that create a large set of files that we don't want to track as rules. So specifying as installed files would be quite painful.

Solution

Allow a user to specify an entire directory as installable. However, we can't simply allow for directories inside the files field. In the files filed, paths such as foo/bar/baz are installed as baz. That would be inconsistent with a directory construct that intends to preserve the internal paths structure (necessary for keeping links alive in html for example).

To accomplish that we can allow one of:

  • A file_tree field instead of files field that will keep the paths structure.
  • a tree constructor. So for example (files (tree dir/foo/)) would maintain the paths while (dir dir/foo/) would strip them.

Issues

Opam's install file format does not allow to specify directories directly. Since dune will have to support opam 2.0, we'll have to flatten the directory into a list of paths.

cc @ejgallego

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions