Repository navigation
Make stacker an opt-in feature - #29505
Merged
Merged
Conversation
MichaReiser
temporarily deployed
to
automations
October 19, 2026 19:18 — with
GitHub Actions
Inactive
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 98.24%. The percentage of expected errors that received a diagnostic held steady at 98.24%. The number of fully passing files held steady at 134/146. |
Memory usage reportMemory usage unchanged ✅ |
|
|
MichaReiser
force-pushed
the
micha/optional-parser-stacker
branch
from
October 19, 2026 23:56
40ad1a8 to
621e6eb
Compare
MichaReiser
had a problem deploying
to
automations
October 19, 2026 23:56 — with
GitHub Actions
Error
MichaReiser
force-pushed
the
micha/optional-parser-stacker
branch
from
October 20, 2026 00:00
621e6eb to
6e3f103
Compare
stacker an opt-in feature
stacker an opt-in featurestacker an opt-in feature
MichaReiser
had a problem deploying
to
automations
October 20, 2026 00:01 — with
GitHub Actions
Failure
MichaReiser
force-pushed
the
micha/optional-parser-stacker
branch
from
October 20, 2026 00:02
6e3f103 to
68524ac
Compare
MichaReiser
temporarily deployed
to
automations
October 20, 2026 00:04 — with
GitHub Actions
Inactive
MichaReiser
marked this pull request as ready for review
October 20, 2026 00:05
MichaReiser
requested review from
charliermarsh
and removed request for
dhruvmanila
October 20, 2026 00:07
| run: cargo test --doc --all-features | ||
| # A workspace build enables stacker through the CLI crates' dependencies. | ||
| - name: "Run parser tests without stacker" | ||
| run: uv run --locked --only-dev cargo nextest run --locked -p ruff_python_parser |
Member
There was a problem hiding this comment.
Should we just do a cargo check here?
charliermarsh
approved these changes
Oct 20, 2026
MichaReiser
force-pushed
the
micha/optional-parser-stacker
branch
from
October 20, 2026 00:54
68524ac to
1f0669e
Compare
MichaReiser
temporarily deployed
to
automations
October 20, 2026 00:54 — with
GitHub Actions
Inactive
This branch was previously deployed
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
Make
stackeran off-by-default parser feature so embedders such as Monty can avoid stack allocations that bypass their custom allocator (and have ty crash instead).It's an off-by-default feature because of feature unification: Monty depending on
ruff_db(transitively throughty_python_semantic) would enable thestackerfeature even if monty disables the parser's default features. Instead, explicitly enable stacker for the targets where it is needed (CLI, wasm) and have feature unification propagate it to all crates that ruff/ty depend on.As discussed with @samuelcolvin in #29181
Review
The first commit groups the stacker related tests and code. It only moves code around. It's the second commit that changes the feature gating. I suggest skipping over commit 1, but have a look if you're curious.
Test Plan
Parser tests and Clippy pass with and without the feature, and repository hooks pass.