Skip to content

Better change detection on deleted files (Cherry-pick of #23311)#23314

Merged
benjyw merged 1 commit into2.32.xfrom
cherry-pick-23311-to-2.32.x
May 5, 2026
Merged

Better change detection on deleted files (Cherry-pick of #23311)#23314
benjyw merged 1 commit into2.32.xfrom
cherry-pick-23311-to-2.32.x

Conversation

@WorkerPants
Copy link
Copy Markdown
Member

There are several longstanding issues on this:

#13232
#14975
#17512
#23240

This has historically been intractable because the
design of dep inference and of change detection
are at odds with each other.

A fully robust solution is still somewhat out of reach,
but this change provides a general-purpose mechanism
that backends can opt in to, and uses that mechanism
in the python backend.

The result is a substantial yet incremental improvement
in the most prominent use case.

The limitation of this mechanism is that it can only
be used if a backend can infer a likely dependency on
a file simply from its path. In Python this is possible because
dotted module paths must recapitulate the filesystem path
from the source root. But this is not true in general for
all languages.

There are several longstanding issues on this:

#13232
#14975
#17512
#23240

This has historically been intractable because the
design of dep inference and of change detection
are at odds with each other.

A fully robust solution is still somewhat out of reach,
but this change provides a general-purpose mechanism
that backends can opt in to, and uses that mechanism
in the python backend.

The result is a substantial yet incremental improvement
in the most prominent use case.

The limitation of this mechanism is that it can only
be used if a backend can infer a likely dependency on
a file simply from its path. In Python this is possible because
dotted module paths must recapitulate the filesystem path
from the source root. But this is not true in general for
all languages.
@WorkerPants WorkerPants added this to the 2.32.x milestone May 5, 2026
@WorkerPants WorkerPants added the release-notes:not-required [CI] PR doesn't require mention in release notes label May 5, 2026
@WorkerPants WorkerPants requested review from benjyw and cburroughs May 5, 2026 04:14
@benjyw benjyw merged commit dd6a57d into 2.32.x May 5, 2026
25 checks passed
@benjyw benjyw deleted the cherry-pick-23311-to-2.32.x branch May 5, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes:not-required [CI] PR doesn't require mention in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants