dap: skip the load build context step when it doesn't have an associated source line#3712
Merged
tonistiigi merged 1 commit intodocker:masterfrom Mar 11, 2026
Conversation
…ted source line Skip the load build context step when it doesn't have an associated source line. This caused an extra branch to be created in an otherwise pretty straightforward dockerfile where stepping in on a copy instruction that used the context would stay on the same line because it "stepped into" the context loading rather than being treated the same as step next. This resulted in some bad and confusing ergonomics with the cursor position that were a bit confusing and unexpected. There might be more areas to try and prune but the most common one, a single branch instruction that doesn't have a location, now gets skipped which is the exact thing that was generated for loading the context. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
tonistiigi
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip the load build context step when it doesn't have an associated
source line. This caused an extra branch to be created in an otherwise
pretty straightforward dockerfile where stepping in on a copy
instruction that used the context would stay on the same line because it
"stepped into" the context loading rather than being treated the same as
step next.
This resulted in some bad and confusing ergonomics with the cursor
position that were a bit confusing and unexpected.
There might be more areas to try and prune but the most common one, a
single branch instruction that doesn't have a location, now gets skipped
which is the exact thing that was generated for loading the context.
Fixes #3565.