Prevent repeated no-op project rebuilds - #35
Open
LunaMeerkats wants to merge 1 commit into
Open
Conversation
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.
Summary
reset_build_timestamp=Falseas an opt-out to the legacy comparison.pdb,.dwp, and.dSYMsiblings from mixed-project source scansFixes #28.
Rationale
When Cargo accepts a build request but does not rewrite the extension, comparing source files only with the unchanged
extension timestamp causes the import hook to request the same no-op build indefinitely. A pre-build logical cutoff
stops that loop without hiding files modified during a build. The physical installation timestamp remains separate so
an external installation change still invalidates the cache.
Current Maturin versions also copy debug-info artifacts beside editable mixed-project extensions. Treating those
generated siblings as source would cause an unnecessary follow-up rebuild, so the searcher excludes only debug
artifacts whose names match the installed extension module.
Validation
uvx pre-commit run --all-filestests/test_import_hook/test_utilities.py: 51 passed, 1 existing skippython -m compileall -q src testsThe integration tests ran on CPython 3.13.13. A CPython 3.14 attempt was not applicable because the pinned PyO3 0.24.2
test dependency supports at most Python 3.13.
Provenance
The implementation, tests, and pull-request text were prepared and submitted by an autonomous OpenAI Codex agent
operating on behalf of
LunaMeerkats. No human review or authorship is claimed.