Skip to content

Rethink our VFS abstraction #18948

Open
Open

Description

@Veykril

The current setup is brittle and tends to break very easily in unexpected ways (#18886 (comment) being an example). The system is also somewhat difficult to follow (the way we partition the VFS into sourceroots is not easily understandable). We should simplify this and clean it up. One idea we've had is to first and foremost move the VFS state into salsa (once we have migrated over to the new one), as currently we have a weird middle ground between the two (some info is outside salsa, some is inside). The other thing is that we need to likely add support for lazily loading file contents (which likely means incurring i/o within salsa queries).

Activity

  1. added
    C-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )
    on Jan 16, 2025
  2. Veykril commented on Jan 16, 2025

    @Veykril
    MemberAuthor

    cc @davidbarsky opening this so we can keep track of it (might want to link to this from the perf tracking issue even)

  3. davidbarsky commented on Jan 16, 2025

    @davidbarsky
    Contributor

    The other thing is that we need to likely add support for lazily loading file contents (which likely means incurring i/o within salsa queries).

    Unless I misunderstood what you said, we can lazily load files and file contents in Salsa today. Regardless, my opinion is that we should try to batch IO as much as possible instead of being lazy.

    cc @davidbarsky opening this so we can keep track of it (might want to link to this from the perf tracking issue even)

    Yeah, I'll update that issue to include this.

  4. davidbarsky commented on Jan 24, 2025

    @davidbarsky
    Contributor

    For posterity, I imagine that the new VFS will end up looking a lot like Dada's or Ruff's new Salsa-powered VFS abstractions.

  5. changed the title [-]Re-think our VFS abstraction[/-] [+]Rethink our VFS abstraction[/+] on Jan 24, 2025
  6. tamird commented on Feb 10, 2025

    @tamird

    Is #15836 also related?

  7. davidbarsky commented on Feb 10, 2025

    @davidbarsky
    Contributor

    Yes, probably.

  8. alanz commented on Mar 4, 2025

    @alanz
    Contributor

    A note about source roots from our usage in ELP, which is based on RA.

    We recently updated the project model to match internal buck2 targets. These generate a test target per test file, and each can have different config, which we store in AppData. To know which options to use for a file we need its AppData, which used to come via the source root. But, now having one source root containing one target does not hold. So we have to jump though hoops to get a mapping from FileId to application information, based on individual FileId, but falling back to source root.
    See e.g. this commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-vfsC-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