Skip to content

One package per directory mode #3255

@NathanReb

Description

@NathanReb

At the dune retreat we mentioned a mode where we wouldn't allow mixing different packages in a given folder.

This seems like a very good idea as it would both encourage users to better structure their project by isolating different packages but also solve some issues we currently have where some artifacts or tests are unattached (see #3015 for instance) without having to explicitly set (package ...) fields everywhere.

Before jumping into the actual implementation I think it would be good to define exactly what we want from this feature.

The easiest thing to do would be to enable it in the dune-project and eventually to add a (dir ...) field to package stanzas in there. From there, each artifact or test in that folder would be implicitly considered as part of the package. You would get an error if you explicitly declared a test or artifact that belongs to a different package.

What are the other features we want from that mode?

Metadata

Metadata

Assignees

Labels

proposalRFC's that are awaiting discussion to be accepted or rejected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions