-
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
Can't find the syntax to use %{ext_obj} in rule's targets? #1189
Comments
We just didn't add support for this yet. If you'd like to work on this, we can give you some pointers on how to add this feature. |
As a side note, does the target appear in the action? If that's the case it might be possible to use a special form to declare the target. |
@emillon I'm not sure to understand? @rgrinberg I think I could give a try on it if you can give me some pointers. |
PreliminariesDune holds all stanza definitions in https://github.com/ocaml/dune/blob/master/src/dune_file.mli#L1 This is where we hold the definition for user defined rules and the Anything that accepts Action PlanThe target's type constructors needs to be modified to accept templates as arguments rather than strings. Once this is done, we should change the rule generation to expand the templates before generating the targets. Expansion is done through the family of functions defined in the super context: https://github.com/ocaml/dune/blob/master/src/super_context.mli#L83 One thing to note is that we can only expand "static" variables here. Dune must know the entire list of targets up front, that is, before the rules have been generated. Luckily for us, If you have any questions, feel free to ask. |
Note that this is related to #690 - |
I had a look. More for learning than because I really need the functionality. I'll come back in some days (weeks) with some questions… |
nojb fixed this |
Thanks to @nojb! |
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)
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)
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)
If I do something like
I get:
while the following is working:
I could not find th right syntax for this?
The text was updated successfully, but these errors were encountered: