Skip to content

Conversation

@gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Nov 12, 2025

Fixes #826

    ── Failure ('test-auto-complete.R:3:3'): R auto complete finds runif vars ──────
    auto_complete_r("method not found") not equal to list().
    Length mismatch: comparison on first 0 components

From the above failing test, I'm assuming that length mismatch is the signal. Instead of returning no completions, "method not found" could be returning one or more completions, which could happen if there's a global variable running around that starts with found.

As far as I can tell, we don't have such a symbol in our tests, so this might be triggering due to CRAN test harness?

learnr:::auto_complete_r("method not found")
#> list()

found_in_cran_test_runner <- "foo"
learnr:::auto_complete_r("method not found")
#> [[1]]
#> [[1]][[1]]
#> [1] "found_in_cran_test_runner"
#> 
#> [[1]][[2]]
#> [1] FALSE

@gadenbuie gadenbuie merged commit ed590a9 into main Nov 12, 2025
8 checks passed
@gadenbuie gadenbuie deleted the gadenbuie-patch-1 branch November 12, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix check issues

2 participants