Task Panel Doesn't Show Any Tasks
Describe the bug
I just made a fresh Fresh Deno project, and in the task panel I don't see any task. But with the CLI, I can see and run them. In #991 I see it been solved, but I got the same problem. Also, on Linux it works so a Windows problem.
I'm on
deno 2.1.2 (release, x86_64-pc-windows-msvc) | vscode_deno 3.42.0 | vscode 1.95.3.
To Reproduce
- Open a Deno Project.
- Go to the task panel.
Expected behavior See task in the Task Panel.
Details
In the CLI, it works all good.
But the Task panel is empty.
If I run Deno: Run Task from the command panel, I get this
Which I thought it might mean I don't have a Deno project open, but I do
And here is the deno.json file, as fresh as it can get.
{
"lock": false,
"tasks": {
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
"cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -",
"manifest": "deno task cli manifest $(pwd)",
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
},
"lint": {
"rules": {
"tags": [
"fresh",
"recommended"
]
}
},
"exclude": [
"**/_fresh/*"
],
"imports": {
"$fresh/": "https://deno.land/x/[email protected]/",
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]",
"$std/": "https://deno.land/[email protected]/"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
}
}
Can you share your deno.xxx settings?
FYI the Deno: Run Task command is for running the task your cursor is on in the deno.json, that's behaving as expected.
Where would I find the deno.xxx settings (I thought that was the deno.json file)
Here is the .vscode\settings.json
{
"deno.enable": true,
"deno.lint": true,
"editor.defaultFormatter": "denoland.vscode-deno",
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[javascriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[javascript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
And .vscode\extensions.json
{
"recommendations": [
"denoland.vscode-deno"
]
}
I also don't see any tasks in the "deno tasks" panel.
Below is my deno.json that i'm still trying to setup for my current workspace...
{
"tasks": {
"serve-src": {
"command": "dsbuild --serve-only --port=3000 --serve-dir=src"
},
"test": "deno test --allow-net",
"lint": "deno lint"
},
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"dom.asynciterable",
"esnext",
"deno.ns"
]
},
"imports": {
}
}
Seems that vscode encode non-ascii paths to uri and deno plugin fails to handle these uris.
Reproduce: open vscode under a path including non-ascii characters (e.g. CJK characters) and active deno plugin.
In #996, the workspace folder URI is converted to a string without encoding before being compared to configTask.sourceUri. Since configTask.sourceUri is a percent-encoded URI in LSP's code, #996 may introduce a new bug when the workspace path contains non-ASCII characters.
ref: https://github.com/denoland/deno/blob/aa1f43702dc79021fe1dfa99e44733aa345a7dce/cli/lsp/language_server.rs#L4364-L4392 https://github.com/denoland/deno/blob/aa1f43702dc79021fe1dfa99e44733aa345a7dce/cli/lsp/urls.rs#L149-L174
Encoding discrepancies between URIs VSCode and Deno LSP have been fixed. Closing for now, but comment here if it's still an issue.
I'm on Win11 using this extension with latest 3.44.0 version and Deno Tasks still empty for me. Don't see any errors or anything suspicious in Output with internal debug enabled