Skip to content
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

refactor: switch to new API for recording deps #9552

Merged

Conversation

rgrinberg
Copy link
Member

@rgrinberg rgrinberg commented Dec 20, 2023

Continuation of the splitting of #9132

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: d4bf94f5-7671-4781-ab35-dcbc204bf72b -->
@rgrinberg rgrinberg force-pushed the ps/rr/refactor__switch_to_new_api_for_recording_deps branch from 2bf2eba to 60b2a3c Compare December 20, 2023 21:36
Copy link
Collaborator

@snowleopard snowleopard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good though isn't this all that's left in the original PR? We might as well merge it.

@rgrinberg
Copy link
Member Author

There's one last PR i'm working on which makes eval_mode private. This requires changing the implementation of a few helpers in dune_rules/action_builder.ml

@snowleopard
Copy link
Collaborator

Cool, almost done :)

@rgrinberg rgrinberg merged commit 2876a55 into main Dec 21, 2023
25 of 26 checks passed
@rgrinberg rgrinberg deleted the ps/rr/refactor__switch_to_new_api_for_recording_deps branch December 21, 2023 00:52
Comment on lines 44 to +46
let contents p =
of_thunk
{ f =
(fun _mode ->
let open Memo.O in
let+ x = Build_system.read_file p in
x, Dep.Map.empty)
}
let* () = Dep.file p |> Dep.Set.singleton |> Build_system.record_deps in
of_memo (Build_system.read_file p)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rgrinberg This wasn't happening before and Coq rules were relying on it. Removing the recording of the dep fixes #10149.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, indeed! Good catch.

Alizter added a commit to Alizter/dune that referenced this pull request Apr 20, 2024
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter added a commit to Alizter/dune that referenced this pull request Apr 20, 2024
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter added a commit to Alizter/dune that referenced this pull request Apr 20, 2024
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter added a commit to Alizter/dune that referenced this pull request Apr 20, 2024
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Apr 22, 2024
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
emillon pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Apr 23, 2024
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
emillon pushed a commit that referenced this pull request Apr 23, 2024
* Add reproduction test case for #10149.

Signed-off-by: Rodolphe Lepigre <rodolphe@bedrocksystems.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>

* stop recording deps in Action_builder.contents

PR #9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue #10149 to appear.

This PR fixes #10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>

---------

Signed-off-by: Rodolphe Lepigre <rodolphe@bedrocksystems.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Co-authored-by: Rodolphe Lepigre <rodolphe@bedrocksystems.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants