allow excluding certain files being copied to the build folder
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ocaml
- Domain
- build-system
Research direction
Start with Dune's Stanza Reference and the existing directory-exclusion behavior, then trace how files are copied into _build/default from the example dune files. Decide how an explicit file exclusion or file-selection stanza should behave, including the proposed .git case. Done means the named files are omitted while other project files and directories continue to be copied.
Written by the indexing model from the issue text.
Description
Desired Behavior
Currently there are ways to exclude certain directories from being copied to the build folder, but there is no way (or at least I could not find one reading the Stanza Reference page) to stop copying certain files.
I would like to suggest adding a stanza like (ignored_files ...) or a stanza like (files ...) to allow explicit exclusion of files to be copied to the build folder.
I believe it is in general nice to have this possible, and it comes especially handy when the build needs to execute external commands whose behavior may depends on specific files in the current directory. For example, in my case I would like to exclude the .git file under a git submodule, whose presence in the build folder messes up invocations to git, and I am using a workaround to delete the copied .git file before invoking any git commands.
Example
project structure
<project_root>/
- .some-file-to-be-excluded
- dune
- dune-project
- module1/
- ...
_build directory with an empty dune file
_build/default
- .some-file-to-be-excluded
- dune
- dune-project
- module1/
- ...
contents of dune, (ignore_files ...) variant
(ignored_files .some-file-to-be-excluded)
contents of dune, (files ...) variant
(files :standard \ .some-file-to-be-excluded)
_build directory with a dune file of either variant listed above
_build/default
- dune
- dune-project
- module1/
- ...
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 287
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.
More from ocaml/dune
-
cli
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
cli
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
cli
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
describe
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
describe
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
elementary/flatpak-platform#253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/hone-maven-plugin#1060 ·
-
0.kind: build failure
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Update Vish to 1.1.5 Openpackage-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100