feat: module mangling & tree shaking - #1
Merged
Merged
Conversation
AlphaKR93
marked this pull request as draft
July 24, 2026 16:42
AlphaKR93
commented
Sep 21, 2026
AlphaKR93
added this pull request to stack #8
September 21, 2026 03:14
AlphaKR93
force-pushed
the
claude/mangle-treeshake
branch
from
September 21, 2026 03:48
210de85 to
bcea787
Compare
AlphaKR93
marked this pull request as ready for review
September 21, 2026 03:49
AlphaKR93
pushed a commit
that referenced
this pull request
Sep 21, 2026
- Represent FFI binaries as a proper FfiModuleSpec occupying their namespace slot in PathProvider's module tree, instead of tracking them separately and re-deriving their dotted path via ad hoc root/prefix matching. Fixes ABI-tagged filenames (e.g. foo.cpython-314-x86_64-linux-gnu.so) being mis-split on suffix. FFI specs are explicitly excluded before parsing, since there's no source for the AST. - Inline the single-use `_insert_after` helper into `_rename_import_alias`, reversing the loop condition to continue/ return early. - Rename module-private helpers in mangler/_modules.py and tree_shake.py to the double-underscore convention used elsewhere for names not used outside their module. - Move `module_output_path` out of the mangler package into project.py, its only caller. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9opxiKpdU1g69c2rVJnqk
AlphaKR93
pushed a commit
that referenced
this pull request
Sep 21, 2026
- Represent FFI binaries as a proper FfiModuleSpec occupying their namespace slot in PathProvider's module tree, instead of tracking them separately and re-deriving their dotted path via ad hoc root/prefix matching. Fixes ABI-tagged filenames (e.g. foo.cpython-314-x86_64-linux-gnu.so) being mis-split on suffix. FFI specs are explicitly excluded before parsing, since there's no source for the AST. - Inline the single-use `_insert_after` helper into `_rename_import_alias`, reversing the loop condition to continue/ return early. - Rename module-private helpers in mangler/_modules.py and tree_shake.py to the double-underscore convention used elsewhere for names not used outside their module. - Move `module_output_path` out of the mangler package into project.py, its only caller. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9opxiKpdU1g69c2rVJnqk
AlphaKR93
force-pushed
the
claude/mangle-treeshake
branch
from
September 21, 2026 03:57
bcea787 to
c041f1d
Compare
AlphaKR93
pushed a commit
that referenced
this pull request
Sep 21, 2026
- Represent FFI binaries as a proper FfiModuleSpec occupying their namespace slot in PathProvider's module tree, instead of tracking them separately and re-deriving their dotted path via ad hoc root/prefix matching. Fixes ABI-tagged filenames (e.g. foo.cpython-314-x86_64-linux-gnu.so) being mis-split on suffix. FFI specs are explicitly excluded before parsing, since there's no source for the AST. - Inline the single-use `_insert_after` helper into `_rename_import_alias`, reversing the loop condition to continue/ return early. - Rename module-private helpers in mangler/_modules.py and tree_shake.py to the double-underscore convention used elsewhere for names not used outside their module. - Move `module_output_path` out of the mangler package into project.py, its only caller. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9opxiKpdU1g69c2rVJnqk
AlphaKR93
added a commit
that referenced
this pull request
Sep 21, 2026
- Represent FFI binaries as a proper FfiModuleSpec occupying their namespace slot in PathProvider's module tree, instead of tracking them separately and re-deriving their dotted path via ad hoc root/prefix matching. Fixes ABI-tagged filenames (e.g. foo.cpython-314-x86_64-linux-gnu.so) being mis-split on suffix. FFI specs are explicitly excluded before parsing, since there's no source for the AST. - Inline the single-use `_insert_after` helper into `_rename_import_alias`, reversing the loop condition to continue/ return early. - Rename module-private helpers in mangler/_modules.py and tree_shake.py to the double-underscore convention used elsewhere for names not used outside their module. - Move `module_output_path` out of the mangler package into project.py, its only caller. Claude-Session: https://claude.ai/code/session_01N9opxiKpdU1g69c2rVJnqk Co-authored-by: Claude <noreply@anthropic.com>
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
Test plan