Add support for dynamic deps coming from %{read-lines:...}#5440
Add support for dynamic deps coming from %{read-lines:...}#5440anmonteiro wants to merge 5 commits intoocaml:mainfrom
%{read-lines:...}#5440Conversation
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
src/dune_engine/string_with_vars.ml
Outdated
|
|
||
| let decode = decode_manually Pform.Env.parse | ||
|
|
||
| let decode_many f = |
There was a problem hiding this comment.
I don't see this function being used anywhere?
There was a problem hiding this comment.
good catch, was from a previous implementation attempt.
|
Thanks, that is indeed an embarrassing omission. I haven't looked closely yet, but I think your fix is on the right track. But first let's make sure we're on the same page. The current behavior is such that |
|
My fix does the first thing, indeed. I haven't tried to implement Indeed these are currently interpreted as file dependencies. Should we try to evaluate them differently, is that what you're saying? |
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
1576f55 to
b69621d
Compare
|
@rgrinberg I opened #5442 which I believe does what you suggest, and looks a lot better in my subjective opinion. |
|
I had a discussion @snowleopard about both of you PR's. The discussion was mostly about whether these changes should make it 3.0.x or be delayed until 3.1.0. We decided that it's safe to include them in 3.0.3. Our original intention was clearly to support this in 3.0. For example, we already had support |
|
coming to think of it I'm not sure whether #5440 should be included. for some reason |
|
It's a bit weird to have |
|
I guess that's fair. I'm happy to do the work, I just thought it'd be a little cumbersome. The problem isn't necessarily about I thought that relaxing that made it a little inconsistent, but it's up to you. I'll personally be sticking to |
test/blackbox-tests/test-cases/dynamic-dependencies/read-macro-produces-dyn-deps.t
Show resolved
Hide resolved
test/blackbox-tests/test-cases/dynamic-dependencies/read-macro-produces-dyn-deps.t
Outdated
Show resolved
Hide resolved
test/blackbox-tests/test-cases/dynamic-dependencies/read-macro-produces-dyn-deps.t
Outdated
Show resolved
Hide resolved
test/blackbox-tests/test-cases/dynamic-dependencies/read-macro-produces-dyn-deps.t
Outdated
Show resolved
Hide resolved
snowleopard
left a comment
There was a problem hiding this comment.
Looks good, thanks! I added some suggestions for the test.
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
|
Thanks for the reviews here. I addressed the suggestions and the test does indeed look more interesting to read now. |
Great! Please add a changelog entry. Otherwise, I think it's ready to be merged. |
|
I added a CHANGES entry and merged. Thanks. |
…e-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info and dune-action-plugin (3.0.3) CHANGES: - Do not enable warnings 63-70 by default (ocaml/dune#5476, fixes ocaml/dune#5464, @rgrinberg) - Allow %{read-lines} to introduce dynamic dependencies like %{read}. (ocaml/dune#5440, @anmonteiro) - Look up `gmake` before `make` (ocaml/dune#5474, fixes ocaml/dune#5470, @rgrinberg) - Handle empty output from `getconf` (ocaml/dune#5473 fixes ocaml/dune#5471, @mndrix) - Depend on any provided `foreign_archives` for ctypes stub generation (ocaml/dune#5475, @mbacarella)
Motivation
Implementation
Test plan