Ark: Argument completions should not evaluate special bindings
Open
@lionel- is already working on this.
Since Feb 5, 2025.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 32
- Avg merge
- 8d 17h
- Merged PRs (30d)
- 11
Description
For instance here: https://github.com/posit-dev/amalthea/blob/73d03d16/crates/ark/src/lsp/completions/session.rs#L481. We take steps to avoid evaluating complex expressions but within functions simple symbols may trigger arbitrary computations via lazy evaluation.
Currently low priority but will become more important when completions within the debugger are supported (#1871). This causes a timeout panic if the freeze lasts for more than 5 seconds, so this should definitely be fixed at some point.
Reprex:
# Simulate an argument that takes a long time when forced
delayedAssign("foo", Sys.sleep(10))
# Requesting argument completions freezes R and the LSP
foo(<CURSOR>)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.