-
Notifications
You must be signed in to change notification settings - Fork 407
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
Rename path variables in dune files #944
Conversation
Implementation looks good, but I wonder if it might be worth it to complicate things a little more for the sake of better error messages. Concretely, we'd like to handle the following cases better:
|
Sure, let's do this! |
Done - I tried to simplify a bit the |
@emillon what about doing this in the main pattern match? i.e.: | Pair ("dep", s) -> if not new_syntax then fail ... |
I tried this, but that requires duplicating the happy path (e.g. |
BTW, I'm having second thoughts about renaming |
Yep that looks better! |
About your comment - yes I agree that reusing the same piece of syntax is a bit dangerous. Can we avoid |
The idea is that the payload of |
We could possibly replace it by just |
A more radical approach might be just adding a |
That would be more generic indeed, however in most of these case the file is always a dependency. While I remember needing this in the past, I can't find a single occurrence of |
A disadvantage of using |
That's true, but we can't check it either if the user writes a plain path without variables |
That's fair! I'll leave that part out and remove |
See ocaml#944 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
See ocaml#842 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
See ocaml#944 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
See ocaml#944 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
See ocaml#944 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
See ocaml#944 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
${path:file}
->%{dep:file}
${path-no-dep:file}
->%{path:file}
See #842.
I moved the path-no-dep test that was in
misc
and expanded it a bit - I don't think that thepath:
(with dep) part was directly tested, so I added a small test as well.