Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-5· anthropicHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION unused-class-members FP: methods called only from Svelte <template>…

  1. User

    ISSUE DESCRIPTION

    unused-class-members FP: methods called only from Svelte member expressions False positive on 2.84.0. Class methods called only from a Svelte <template> via a member expression (for example resultState.pin(...) in markup) are reported as unused-class-member. Fallow tracks template-visible identifiers but not member-expression method calls on a bound instance inside Svelte markup.

    Repro (2.84.0): asciimoo/hister. ResultState.onOpen, .pin, .updateLabel, and .addSkipRule are each invoked from .svelte templates (resultState.pin(...) in ResultActionsMenu.svelte) yet reported unused. The repo currently sets rules.unused-class-members: "off" to work around it.

    Expected: credit a method called as <local>.<method>(...) inside a Svelte <template> when <local> resolves to an instance of the class, parallel to the existing Vue/Angular template member-access tracking.

    Interface

    No new interfaces are introduced.

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /fallow, current file: none) bash-$

  2. Claude Assistant

    Good, walk is already imported. Now let's look at the ModuleInfoExtractor struct fields definition to add a new field.

  3. Claude Assistant

    Let's do the refactor. First view surrounding TSSignature import to confirm it's already imported (used oxc_ast::ast::*).

  4. Claude Assistant

    Good, wildcard import covers it. Now let's refactor:

  5. Claude Assistant

    Now let's replace lines 476-552 with the refactored version, extracting the TSTypeLiteral body into a shared helper function.

  6. Claude Assistant

    Good, refactor looks correct. Let's add a blank line before fn fixture_type_reference_name.

  7. Claude Assistant

    Now let's add record_playwright_fixture_type_interface near record_playwright_fixture_type_alias, and hook it into the interface declaration branch.

  8. Claude Assistant

    Now hook it into the TSInterfaceDeclaration branch of visit_declaration:

  9. Claude Assistant

    Now let's add the new method right after record_typed_binding:

  10. Claude Assistant

    Now let's hook this into visit_variable_declaration, and add the $props rune detection helper.

  11. Claude Assistant

    Now add the is_svelte_props_rune_call helper function near playwright_extend_base_name:

  12. Claude Assistant

    Now let's build to check for errors.

  13. Claude Assistant

    Compiles clean. Now let's rebuild the release CLI binary and re-run the repro.

  14. Claude Assistant

    Found it — a stale cache. Let's clear it and rerun.

  15. Claude Assistant

    Fixed. Let's remove the debug tests I added and also test other Svelte prop patterns (Svelte 4 export let, inline literal, etc.) to make sure nothing regressed.

  16. Claude Assistant

    Good, debug tests removed. Now let's rebuild and run the extract crate test suite plus the full core test suite.

  17. Claude Assistant

    All extract crate tests pass. Now run the core crate tests to make sure the analysis pipeline still works.

  18. Claude Assistant

    All 523 tests pass. Let's also run the full workspace test suite to make sure nothing else broke.

  19. Claude Assistant

    Confirmed: this test fails even without my changes (pre-existing, environment-related — likely root user bypassing read-only permission checks). Restoring my changes now.

  20. Claude Assistant

    Just trailing blank lines — let's remove them to keep the diff clean.

  21. Claude Assistant

    Now only visit_impl.rs is modified, as expected. Let's review the full diff.

  22. Claude Assistant

    Inline type literal works. Now test renamed destructure and $props() generic form:

  23. Claude Assistant

    Renamed destructure works. Now the $props<T>() generic call form:

  24. Claude Assistant

    Excellent, all patterns work. Now let's verify genuinely-unused members are still flagged (no over-crediting):

  25. Claude Assistant

    Only pin used, others correctly still flagged. Now let's test the original Svelte 4 export let pattern still works (regression check) and also a plain .ts file with interface + destructure to check no over-crediting there either.

  26. Claude Assistant

    Svelte 4 pattern still works fine. Now let's check a plain .ts file destructure doesn't cause over-crediting from unrelated calls (sanity check that this only credits within same-file resolution logic as expected, consistent with existing conventions):

  27. Claude Assistant

    Exactly right — used credited, unused still flagged. No over-crediting. Now let's clean up temp directories and finalize with a full diff review.

  28. Claude Assistant

    Let's run cargo clippy on the affected crate to check for lint issues, since the repo appears to enforce strict lints (clippy::too_many_lines, #[expect(...)], etc.).

  29. Claude Assistant

    Clean. Now let's also check formatting via cargo fmt --check for the file we modified.

  30. Claude Assistant

    Let's apply formatting.

  31. Claude Assistant

    Formatting clean now. Let's re-run tests to confirm everything still passes after formatting.

  32. Claude Assistant

    All tests pass. Let's view the final diff once more for a clean review.

  33. Claude Assistant

    This is a clean, focused diff. Let's do a final full build and test run to be certain everything is solid.

  34. Claude Assistant

    Whole workspace builds cleanly.

  35. Claude Assistant

    All test suites pass except the one pre-existing environment-dependent failure unrelated to this change. Let's do a final review of the diff and clean up any leftover temp files.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.