posit-dev / posit-dev/ark

Ark: `signature_help()` issue with `...` arguments

Open
#983 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
337
Forks
32
Avg merge
8d 17h
Merged PRs (30d)
11

Description

If you type options(scipen = 2, <tab>) then you'll get a list of additional options to autocomplete.

If you type options(2, <tab>) then you won't get anything, and Rust is actually panicking under the hood.

Something is wrong with how signature_help() tags the ... option in the second case.

Notice how in the second image, it tries to get() an index of 2, but the parameters is only length 1 (the ... argument is the only parameter).

Screenshot 2023-11-27 at 4 10 57 PM Screenshot 2023-11-27 at 4 12 02 PM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two options() calls with signature_help(), comparing autocomplete for options(scipen = 2, ...) and options(2, ...). Trace how signature_help() tags the ... parameter and handles the index lookup; done means the second case no longer panics and provides the expected autocomplete behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.