Skip to content

x/tools/gopls: issue an event when tests change #69495

Open
@firelizzard18

Description

@firelizzard18

In my work to integrate #59445 into vscode-go, I am relying on file-change notifications to keep the test tree up to date as files change. @hyangah pointed out that the ideal solution would be to use notifications that tests were changed instead. I'm opening this issue to discuss whether it is feasible for gopls to send notifications to the editor when test discovery results change, and if so how that may be achieved.

As a followup, it would be powerful to extend change detection to arbitrary symbols and to follow the reference graph to affected tests, so that changing a function called by a test (and more generally, a symbol within the test's reference graph) would trigger an event and (in an editor with an active continuous test run) re-execute the test. I think the reference graph tracing should be reasonable to do within a package. I would be happy to submit a separate proposal for this.

CC @adonovan @findleyr

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions