Skip to content
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

use vscode API vs fs/promises for terminal suggest #239531

Closed
wants to merge 2 commits into from

Conversation

meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Feb 3, 2025

fix #236831

Now npm run watch-web runs smoothly.

Noticed we don't use import * as fs from 'fs/promises'; in any other extensions, seems to cause problems.

Edit: this will break things - we want to look globally - not related to the workspace.

@meganrogge meganrogge requested a review from Tyriar February 3, 2025 20:28
@meganrogge meganrogge self-assigned this Feb 3, 2025
@meganrogge meganrogge added this to the February 2025 milestone Feb 3, 2025
@@ -86,7 +85,7 @@ export class PathExecutableCache implements vscode.Disposable {

private async _getFilesInPath(path: string, pathSeparator: string, labels: Set<string>): Promise<Set<ICompletionResource> | undefined> {
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I find it weird that before this check for path &&, this was failing bc the vscode.workspace.fs.stat(vscode.Uri.file('')).then(stat) => stat.type === vscode.FileTypeDirectory, would return true

Screenshot 2025-02-03 at 3 19 36 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

with path of '', it finds tons of files

Screenshot 2025-02-03 at 3 22 58 PM

@meganrogge meganrogge marked this pull request as draft February 3, 2025 21:23
@meganrogge
Copy link
Contributor Author

I don't think this is the right approach, thus closing

@meganrogge meganrogge closed this Feb 3, 2025
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.

Packing of terminal-suggest fails on 'fs/promises' while building from source
1 participant