Skip to content

Should rust-analyzer have perfect replay functionality? #10086

@matklad

Description

@matklad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions