Skip to content

dap: defer inputs for a step to prevent overeager evaluation#3687

Open
jsternberg wants to merge 1 commit intodocker:masterfrom
jsternberg:dap-filter-inputs
Open

dap: defer inputs for a step to prevent overeager evaluation#3687
jsternberg wants to merge 1 commit intodocker:masterfrom
jsternberg:dap-filter-inputs

Conversation

@jsternberg
Copy link
Collaborator

@jsternberg jsternberg commented Mar 3, 2026

When the debug thread was updated to always solve inputs from the
operation that it was tied to it became a bit overeager to evaluate
them. The intention of the steps is to have a single direct parent and
then potentially multiple "function calls" that can be evaluated with
step into and step out to leave.

With the change, that logic stayed in, but the inputs were always being
evaluated before they were stepped into or over. Now, when we construct
the steps, we also attach a list of inputs that we should defer
evaluation on to ensure we don't execute inputs that haven't been
executed yet.

It will then wrap the reference with a version that causes Evaluate to
do nothing. This prevents the overeager evaluation but allows the
reference to be evaluated if we need to read the filesystem.

@jsternberg jsternberg requested a review from tonistiigi March 4, 2026 20:02
@jsternberg jsternberg changed the title dap: filter inputs for a step to prevent overeager evaluation dap: defer inputs for a step to prevent overeager evaluation Mar 16, 2026
@jsternberg jsternberg force-pushed the dap-filter-inputs branch 3 times, most recently from 627e79c to ca1832a Compare March 16, 2026 19:41
When the debug thread was updated to always solve inputs from the
operation that it was tied to it became a bit overeager to evaluate
them. The intention of the steps is to have a single direct parent and
then potentially multiple "function calls" that can be evaluated with
step into and step out to leave.

With the change, that logic stayed in, but the inputs were always being
evaluated before they were stepped into or over. Now, when we construct
the steps, we also attach a list of inputs that we should defer
evaluation on to ensure we don't execute inputs that haven't been
executed yet.

It will then wrap the reference with a version that causes `Evaluate` to
do nothing. This prevents the overeager evaluation but allows the
reference to be evaluated if we need to read the filesystem.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
@jsternberg jsternberg marked this pull request as ready for review March 17, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant