rust-lang / rust-lang/rust-analyzer

Should rust-analyzer have perfect replay functionality?

Open
#10,086 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-Architecture
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

One thing we can architecturally do is to record an exact, machine-independent snapshot of salsa database at any given point in time.

One use-case for such snapshots are bug reproductions. For example, when a request handler panics, we can record a snapshot, and provide guaranteed working bug repro (the cool thing here is strong transactional semantics -- handlers can't change db state, so we can snapshot after we know the stuff panics).

The question is, should we even have this kind of feature? The problem here is privacy -- such a snapshot will include all the source code, for example.

I can see three options here, are there more?

  • status quo, do nothing
  • hide snapshotting behind compile-time / runtime flag -- when you hit a bug, you'd have to re-run/re-compile rust-analyzer and reproduce it
  • always collect snapshots (we probably can store then in memory though, size of snapshot should be rather small)

We definitely shouldn't do any kind of automatic telemetry uploading -- even if we do record snapshots, sending them out of the user's machine should be done manually by the user.

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

No files, tests, or entry points are named. Start by evaluating the salsa database snapshot proposal against the three listed collection options and the privacy constraint; done would be a documented architectural decision about whether and how user-controlled snapshots should work, without automatic upload.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.