Skip to content

Ark: Debugger: Provide virtual documents for dangling source references #2282

Open

Description

@lionel-

When a package is bundled with source references, they often point to dangling locations on the build machine. This happens for instance when installing with devtools, see discussion in #1733, but also more generally when a package is shipped with source references by a distributor.

However the source references contain sufficient information to recreate the whole source tree ourselves. To leverage this we could register a document provider (https://code.visualstudio.com/api/extension-guides/virtual-documents) that consults these source references. On the backend side we'll also need to transform the dangling paths to the corresponding vdoc URI scheme, for instance when the jump-to-definition action is invoked.

The goal is two-fold: Allowing navigation across the source files of an installed packages, as well as debugger-stepping in context inside these sources.

Worth noting that in some cases the sourceref data may be preferred to the actual files on disk, for instance if the local repo is visiting a different branch. So even if the location exists, we should check that it's up to date and opt for a virtual source document if not the case.

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

    area: debuggerlang: r

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions