Skip to content

Feature request: (data_only_dirs) should hide directories from (include_subdirs qualified) #7628

@Niols

Description

@Niols

Desired Behavior

I would want for the file trees mentioned in (data_only_dirs) to be hidden from some other features of Dune such as (include_subdirs qualified). For this specific case, I would want those file trees to be able to contain directories (or .ml and .mli files, why not) whose names would not be valid module names.

Example

Imagine a project with

$ tree
.
├── bar
│   └── baar.ml
├── baz-baz
│   └── some-data
├── dune
├── dune-project
└── foo.ml

where dune contains both (include_subdirs qualified) and (data_only_dirs baz-baz). I would want this project to compile file, the module Foo getting access to Bar.Baar and being able to read baz-baz/some-data at compilation time (eg. with ppx_blob). I would also want this to work if baz-baz were nested in a directory baz (whose name is a valid module name) and if dune contained (data_only_dirs baz) instead.

Both these examples are introduced by the PR #7620.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions