-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate Diagnostic collection. #759
Comments
happy to tackle this one too |
So #694 and #750 need to be considered at the same time, as they both have a common need. For right now I would say we don't want to do anything about #670 as it would involve adding in logic similar to TSCBasic for reading the bitstream format. So for showing progress and improving diagnostics, we need access to the output from the swift process. We cannot get this using a ProcessExecution or a ShellExecution for the resolved tasks. So we need to create our own CustomExecution. Since the "swift" tasks just take an arbitrary array of "args", we'll need the resulting terminal to be interactive, for example if they "run" some executable with a CLI. VSCode already has a native bundled node-pty module we can load. It is even in the remote extension host asar bundle so would work for remote workflows. I've got a POC working for Windows, macOS, and linux. The biggest risk is making sure the Pty environment behaves the same as the current ProcessExecution, but can take a look through terminalProcess.ts for some help. With access to the swift output, we can control the diagnostic output |
@award999 Setting up a
Not sure what interaction we will need. This should only be for running the swift executable and its children. You should verify that environment variables aren't changing between running tasks, as changes in the environment will cause a full rebuild when running |
For example if running executable tries to read from stdin, ex.
The environment would be set for each PTY process spawned, not the shared pseudo terminal, but absolutely will double check this. Thanks so much for the feedback @adam-fowler 😃 |
And @adam-fowler I was going to just focus on parsing diagnostics from output for now and potentially looking at reading the serialized diagnostics down the road (#670). To synchronize the parsed diagnostics and the sourcekit-lsp diagnostics to prevent duplicates, and remove stale diagnostics, my proposal is:
|
@award999 Can we add a PR with just the custom Otherwise all sounds good. I don't know if it is possible but if we could somehow match the |
@adam-fowler is it cool to close these off as the investigation has been done, with other PRs or issues created |
Just catching up, which PRs or Issues are these? |
Just copied and pasted my message from other issue. In this case it is we have the other issues raised. I'll throw up a PR later this morning |
Currently we have a number of issues regarding Diagnostic collection. In general most issues are generated by the fact we have two sources of diagnostics (sourcekit-lsp and the compiler). This issue is to discuss methods of collating these into one list.
Paths to investigate.
vscode.languages.createDiagnosticCollection("test")
The text was updated successfully, but these errors were encountered: