Skip to content

VS Code diagnostics#1092

Closed
JonasWanke wants to merge 6 commits intomainfrom
vs-code-diagnostics
Closed

VS Code diagnostics#1092
JonasWanke wants to merge 6 commits intomainfrom
vs-code-diagnostics

Conversation

@JonasWanke
Copy link
Copy Markdown
Member

@JonasWanke JonasWanke commented Dec 14, 2024

Depends on #1091!

Based on Martinaise's implementation, but doesn't read updated files from the editor yet (instead loading the file from disk)

Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

@JonasWanke JonasWanke self-assigned this Dec 14, 2024
@jwbot jwbot enabled auto-merge December 14, 2024 20:46
listener: (line: string, lineCount: number, byteCount: number) => void,
): EventEmitter;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
on(event: "error", listener: (error: any) => void): EventEmitter;

Check failure

Code scanning / ESLint

Disallow the `any` type

Unexpected any. Specify a different type.
Comment on lines +31 to +34
currentRun = new Promise(async (resolve) => {
await callback();
resolve(null);
});

Check failure

Code scanning / ESLint

Disallow Promises in places not designed to handle them

Promise returned in function argument where a void return was expected.
await currentRun;
if (generation != myGeneration) return; // a newer update exists and will run
// eslint-disable-next-line @typescript-eslint/no-misused-promises, no-async-promise-executor
currentRun = new Promise(async (resolve) => {

Check failure

Code scanning / ESLint

Disallow using an async function as a Promise executor

Promise executor functions should not be async.
Comment on lines +123 to +134
linebyline(candy.stdout).on("line", async function (line: string) {
console.info("Line: " + line);
const message = JSON.parse(line) as AnalyzeMessage;
switch (message.type) {
case "read_file":
candy.stdin.write(await handleReadFileMessage(message));
break;
case "diagnostics":
diagnostics = message.diagnostics;
break;
}
});

Check failure

Code scanning / ESLint

Disallow Promises in places not designed to handle them

Promise returned in function argument where a void return was expected.
@jwbot jwbot added P: Compiler: Language Server Package: The Candy Language Server P: Compiler: Frontend Package: The compiler frontend P: Compiler: Fuzzer Package: Candy's built-in fuzzer fuzzing Candy code P: Compiler: VM Package: The VM executing Candy byte code (LIR) P: Compiler: CLI Package: Candy's command-line interface P: Compiler: Formatter Package: Candy's formatter P: Compiler: Inkwell Backend Package: Inkwell Compiler Backend producing native code via LLVM labels Dec 19, 2024
@JonasWanke
Copy link
Copy Markdown
Member Author

Merged as part of #1117

@JonasWanke JonasWanke closed this Oct 2, 2025
auto-merge was automatically disabled October 2, 2025 11:58

Pull request was closed

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

Labels

P: Compiler: CLI Package: Candy's command-line interface P: Compiler: Formatter Package: Candy's formatter P: Compiler: Frontend Package: The compiler frontend P: Compiler: Fuzzer Package: Candy's built-in fuzzer fuzzing Candy code P: Compiler: Inkwell Backend Package: Inkwell Compiler Backend producing native code via LLVM P: Compiler: Language Server Package: The Candy Language Server P: Compiler v4 Package: Compiler v4 P: Compiler: VM Package: The VM executing Candy byte code (LIR) P: Compiler: VS Code Extension v4 P: Packages v5 Package: Packages v5

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants