Skip to content

Unused parameter warning: get_first_call_arg's source in extractors/javascript.rs #1867

Closed

Description

@carlos-alm

While rebuilding the native crate for an unrelated change (issue #1753), `cargo build --lib` emits:

```
warning: unused variable: `source`
--> crates/codegraph-core/src/extractors/javascript.rs:2499:48
|
2499 | fn get_first_call_arg<'a>(call_node: &'a Node, source: &[u8]) -> Option<Node<'a>> {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_source`
```

This is pre-existing (unrelated to #1753's points-to solver config threading) — introduced by commit 3e8035d ("fix: gate Array.from's callback arg by position, not just callee name"). Low priority: either the `source` parameter should be prefixed with `_` if intentionally unused, or removed from the signature (and all call sites) if truly dead.

Activity

  1. carlos-alm commented on Jul 8, 2026

    @carlos-alm
    ContributorAuthor

    Duplicate of #1817 — same get_first_call_arg unused source parameter warning in crates/codegraph-core/src/extractors/javascript.rs, just re-discovered independently at a shifted line number. The fix already exists as commit c0e7eae8 ("fix(native): remove unused source param from get_first_call_arg") on branch fix/issue-1817-unused-source-param-on-get-first-call-arg-in, open as PR #1960. Verified directly: the function signature in the current stacked-branch tree already has no source parameter, and a dedicated test block covers all three call sites. No further work needed here — closing as duplicate once #1960 merges.

  2. carlos-alm commented on Jul 30, 2026

    @carlos-alm
    ContributorAuthor

    PR #1960 (fix(native): remove unused source param from get_first_call_arg) merged on 2026-07-09, closing the duplicate #1817 this issue was tracking. Verified against current main: get_first_call_arg in crates/codegraph-core/src/extractors/javascript.rs no longer takes a source parameter. Closing as duplicate/already resolved — no further work needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions