Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Installable directories #1868

Closed
rgrinberg opened this issue Feb 25, 2019 · 7 comments
Closed

[RFC] Installable directories #1868

rgrinberg opened this issue Feb 25, 2019 · 7 comments
Labels
Milestone

Comments

@rgrinberg
Copy link
Member

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

@rgrinberg rgrinberg added the coq label Feb 25, 2019
@ejgallego
Copy link
Collaborator

Note that this also applies to Dune's own documentation.

@avsm
Copy link
Member

avsm commented Mar 31, 2019

This also came up when porting opam2web to dune, since it needs to install a bunch of javascript files. I've worked around it with a manual list in the dune file for now: https://github.com/ocaml/opam2web/pull/169/files#diff-11e776521519814f941e83aba6ddf08e

@kit-ty-kate
Copy link
Member

kit-ty-kate commented Jul 16, 2019

I'm also having the same problem while trying to port the installation part of herd/herdtools7 to dune (they currently use shell scripts for configure and install and I was really hoping to be able to not use any shell scripts)

@anton-trunov
Copy link

I would also love to have this feature to install a standard library of a language under development along with its interpreter.

@rgrinberg rgrinberg modified the milestones: 3.2.0, 3.3.0 May 19, 2022
@rgrinberg rgrinberg modified the milestones: 3.3.0, 3.4.0 Jun 17, 2022
@emillon emillon modified the milestones: 3.4.0, 3.5.0 Jul 20, 2022
@Alizter Alizter moved this to Todo in Coq + Dune Nov 1, 2022
@Alizter Alizter moved this from Todo to Done in Coq + Dune Nov 1, 2022
@ejgallego
Copy link
Collaborator

Was this fixed by #5097 ?

@kit-ty-kate
Copy link
Member

not entirely. See #6133

@ejgallego
Copy link
Collaborator

ejgallego commented Jul 18, 2023

Thanks for the information @kit-ty-kate , I won't reopen this bug as we already have #6133 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

6 participants