Skip to content

Remove old workspace collection#33

Merged
guillaume-kotulski merged 2 commits intodevelopfrom
feature/save
Oct 15, 2025
Merged

Remove old workspace collection#33
guillaume-kotulski merged 2 commits intodevelopfrom
feature/save

Conversation

@guillaume-kotulski
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the old workspace diagnostic collection and modernizes the diagnostic handling approach by leveraging the language client's built-in diagnostic capabilities instead of maintaining a separate collection.

Key changes:

  • Removed the custom _workspaceDiagnostic collection from the Ctx class
  • Updated the language client configuration to remove custom diagnostic middleware
  • Modified the workspace syntax checking to use the language client's diagnostic collection

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
editor/src/ctx.ts Removed custom workspace diagnostic collection and simplified language client setup
editor/src/commands.ts Updated workspace syntax checking to use language client's diagnostic collection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 9 to 10
StreamInfo,
Diagnostic
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Diagnostic import is added but appears unused after removing the custom diagnostic middleware. Consider removing this unused import.

Suggested change
StreamInfo,
Diagnostic
StreamInfo

Copilot uses AI. Check for mistakes.
import { Logger } from "./logger";
import { existsSync, readdirSync, rmdirSync, rm } from "fs";
import * as path from "path";
import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic';
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DiagnosticFeature import appears unused after removing the diagnostic middleware. Consider removing this unused import.

Suggested change
import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic';

Copilot uses AI. Check for mistakes.

const response = await client.sendRequest(ext.checkWorkspaceSyntax, params);
const diagnosticCollection = ctx.workspaceDiagnostic;
const diagnosticCollection = ctx.client.diagnostics;
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing ctx.client.diagnostics without null checking could cause runtime errors if the client is not initialized. The ctx.client property can be null as defined in the constructor.

Copilot uses AI. Check for mistakes.
@guillaume-kotulski guillaume-kotulski merged commit 5cf32ed into develop Oct 15, 2025
1 check passed
F4r3n pushed a commit that referenced this pull request Nov 28, 2025
* Remove old workspace collection

* fix unused import
guillaume-kotulski added a commit that referenced this pull request Nov 28, 2025
* fix project creation

* update dependencies

* accept greater version number

* add ask input password for linux

* update dependency

* add test script

* update dependencies

* remove logs

* 4qs compatible

* fix eslint

* ignore lock in extension

* add syntaxes 4qs in vscodeignore

* Use commonjs for the extension

* Remove old workspace collection (#33)

* Remove old workspace collection

* fix unused import

* Fix download tool4d

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant