-
Notifications
You must be signed in to change notification settings - Fork 415
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
fix(rules): merge allowed subdirs correctly for Redirect_to_parent rules #7207
fix(rules): merge allowed subdirs correctly for Redirect_to_parent rules #7207
Conversation
663ede5
to
1ffaebc
Compare
a9841e2
to
eafb7fd
Compare
Moved the automatic subdir stuff over to #7208 and fixed your review comments. |
eafb7fd
to
9b797ce
Compare
a1257c2
to
c4fa88e
Compare
c4fa88e
to
731986a
Compare
8fd380b
to
d9105b3
Compare
@snowleopard I requested your review on this one since it touches the engine and you were a reviewer of #6637. |
522eaea
to
1f35f58
Compare
1f35f58
to
09eba42
Compare
e251d39
to
da8e529
Compare
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.
Thanks for addressing all my comments. Looks good now!
Thanks! |
907b19a
to
cdaacbd
Compare
Squashed my commits. |
@@ -501,14 +501,15 @@ end = struct | |||
|
|||
module Normal = struct | |||
type t = | |||
{ build_dir_only_sub_dirs : Subdir_set.t | |||
{ build_dir_only_sub_dirs : Build_config.Rules.Build_only_sub_dirs.t |
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.
In make_rules_gen_result
we verify that both rules
and directory_targets
only contain valid keys. We should similar validation for this map as well.
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.
did that in 72bea81
src/dune_rules/gen_rules.ml
Outdated
@@ -405,29 +413,34 @@ let rec under_melange_emit_target ~dir = | |||
| None -> under_melange_emit_target ~dir:parent | |||
| Some stanza -> Memo.return @@ Some { stanza_dir = parent; stanza })) | |||
|
|||
let melange_emit_rules sctx { stanza_dir; stanza } = | |||
let rules_for ~dir components rules = |
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.
I find the way this is factored is making less clear. In some functions, we pass components
, elsewhere, we use this components
to compute the automatic_subdirs_map
. How about we just compute automatic_subdirs_map
right away and pass that around.
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.
check 33a7336 where I implemented your suggestion.
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
04e678c
to
33a7336
Compare
build_dir_only_sub_dirs
Build_config.Rules.t
can now contain rules for multiple directories,build_dir_only_sub_dirs
is still a flat set of sub-directories, leading Dune to (wrongly) assume that both directories which had their rules combined can traverse the same set of sub-directories, when that's not the case.