Ability to use sub-extensions for virtual modules.
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
One of the things that comes up with virtual libraries is that you have a File.rei, and then several implementations ./test/File.re and ./prod/File.re.
But people have given feedback that feel like this is really confusing when searching for files. Many editors and tools don't surface the preceding directory names and so the notion of what "File.re" means, is now confusing when navigating a large codebase. For large monorepos people try to abide by the convention that there is one file per unique name. We would really like to see the ability to name files like ./test/File.test.re and ./prod/File.prod.re, but this doesn't currently work. This is also an issue if you want to use a File.cppo.re extension as well so it seems this might be a bug (module name normalization might just not be activated for virtual libraries like it is everywhere else).
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files, tests, or entry points. Start by reproducing a virtual library with File.rei, test/File.test.re, and prod/File.prod.re, then trace how Dune normalizes virtual-library module names. Done means sub-extensions such as .test.re, .prod.re, and .cppo.re work without module-name conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100