Repository navigation
Conversation
The .phpt filter landed with two build breaks that only surface once it sits on top of develop. `parse()` declared its regexes in a `lazy_static!` block, but lazy_static is not a dependency of this crate — the merge kept the code and dropped the manifest entry. RTK's rule is `LazyLock` statics anyway, so hoist the four regexes to module level as `LazyLock<Regex>` rather than re-adding the crate. The `rtk phpt` discover rule spelled out `subcmd_savings`/`subcmd_status` instead of ending in `..RtkRule::DEFAULT`, so it missed the `pipeline_final_safe` field that develop added to `RtkRule` in the meantime. Fall back to the default like every neighbouring rule; phpt is not pipeline-final safe, and `false` is what DEFAULT already carries. `cargo fmt --all && cargo clippy --all-targets && cargo test --all` is clean again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 31, 2026
Contributor
|
Fixed by #3798 Saw develop state this morning and went for a direct fix |
Contributor
|
Thanks :) |
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.
developdoes not build since 2201905 (feat(phpt): add PHP .phpt filter for php-src run-tests.php, #1503).cargo clippy --all-targetsfails with 7 errors.What broke
1.
lazy_staticis not a dependency.parse()insrc/cmds/php/phpt_cmd.rsdeclared its four regexes inside alazy_static::lazy_static!block. The branch carried a matchingCargo.toml/Cargo.lockentry, but the manifest side did not survive the merge, so the crate is unresolved:…plus four
E0425 cannot find value STATUS_RE / NUMBER_OF_TESTS_RE / TIME_RE / STAT_REand oneunused import: regex::Regexfalling out of it.Rather than re-add the crate, the regexes are hoisted to module-level
LazyLock<Regex>statics — that's the mandated pattern in.claude/rules/rust-patterns.mdand what every other filter insrc/cmds/php/already does. The patterns and the comment explaining theSTATUS_REanchoring are unchanged.2. A
RtkRuleinitializer that doesn't defer toDEFAULT.The
rtk phptrule listedsubcmd_savingsandsubcmd_statusexplicitly instead of closing with..RtkRule::DEFAULT, so it missedpipeline_final_safe— a field develop added toRtkRulewhile the phpt branch was open:Now spelled
..RtkRule::DEFAULTlike its neighbours.phptis not pipeline-final safe (onlygrepandrgare), andDEFAULTalready carriesfalse, so behaviour is identical to what the phpt branch intended.Verification
Clean: zero clippy warnings, 2882 unit tests + all integration tests passing, including the phpt filter's own units, its insta snapshot, and its token-savings assertion.
No filter behaviour changes — this is a build fix only.
🤖 Generated with Claude Code