-
Notifications
You must be signed in to change notification settings - Fork 412
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] Lift subdirectory restriction on copy_files stanza? #1323
Conversation
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Yes it can be lifted. The limitation is that if you write this in This seems like an acceptable limitation to me, especially given that BTW, in general we try to make it so that new features are only available if the user writes the correct version in the if def.syntax_version < (1, 4) && not (Path.is_descendant ...) then
Syntax.Error.since ... You also need to upgrade the latest version of |
You can actually make this available in 1.3 as we will need to re-release it as upgrading to opam 2.0 is required to submit packages now |
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Thanks for the review! I pushed a commit enabling this only from 1.3 onwards. |
Would you mind updating the Also, don't forget a CHANGES entry. |
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
d96e526
to
3cb7e76
Compare
3cb7e76
to
c5f32a0
Compare
Updated CHANGES and added a small test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good nojb. Thanks for the contribution
ensures that [sources_and_targets_known_so_far] returns the | ||
right answer for sub-directories only. *) | ||
if not (Path.is_descendant glob_in_src ~of_:src_dir) then | ||
if def.syntax_version < (1, 3) && not (Path.is_descendant glob_in_src ~of_:src_dir) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note that we usually wrap our code to 80 chars. I'm not sure if it's over the limit here, but something to keep in mind.
CHANGES: - Support colors on Windows (ocaml/dune#1290, @diml) - Allow `dune.configurator` and `base` to be used together (ocaml/dune#1291, fix ocaml/dune#1167, @diml) - Support interrupting and restarting builds on file changes (ocaml/dune#1246, @kodek16) - Fix findlib-dynload support with byte mode only (ocaml/dune#1295, @bobot) - Make `dune rules -m` output a valid makefile (ocaml/dune#1293, @diml) - Expand variables in `(targets ..)` field (ocaml/dune#1301, ocaml/dune#1320, fix ocaml/dune#1189, @nojb, @rgrinberg, @diml) - Fix a race condition on Windows that was introduced in 1.2.0 (ocaml/dune#1304, fix ocaml/dune#1303, @diml) - Fix the generation of .merlin files to account for private modules (@rgrinberg, fix ocaml/dune#1314) - Exclude the local opam switch directory (`_opam`) from the list of watched directories (ocaml/dune#1315, @dysinger) - Fix compilation of the module generated for `findlib.dynload` (ocaml/dune#1317, fix ocaml/dune#1310, @diml) - Lift restriction on `copy_files` and `copy_files#` stanzas that files to be copied should be in a subdirectory of the current directory. (ocaml/dune#1323, fix ocaml/dune#911, @nojb)
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
In #911 (comment), it is implied that this restriction should not be required anymore.
I don't yet know enough about the inner workings of
dune
to investigate this on my own, so:merlin
issue alluded to in the comment in the code?