When project opened in remote, all changes applying to tasks.json require a window reload to take effect.
mcr.microsoft.com/vscode/devcontainers/base:0-alpine-3.12)mcr.microsoft.com/vscode/devcontainers/javascript-node:0-10)tasks.json with some tasks defined..tasks.json and save.Updated task should be executed.
Updated task not taken effect and Old task was executed.
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
Could you post the before and after JSON of the task? (Tried to reproduce with a simple echo.)
Could you post the before and after JSON of the task? (Tried to reproduce with a simple
echo.)
You can check this repository: https://github.com/pingu8007/vscode-remote-3497
To reproduce, open this directory within Container or WSL, make some changes on tasks.json such as:
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index a4ea5f4..649a750 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -14,7 +14,7 @@
{
"label": "printenv",
"type": "shell",
- "command": "printenv | grep MY_VARIABLE"
+ "command": "printenv #| grep MY_VARIABLE"
}
]
}
\ No newline at end of file
Then save and execute task without window reload.
Changes will be applied without issue when opened locally. Otherwise, both Container and WSL require a window reload to take effect.
@pingu8007 where is your task file? This sounds similar to this issue, where the location of the file seems to make a difference: https://github.com/microsoft/vscode/issues/96537#issuecomment-635714095
@pingu8007 where is your task file? This sounds similar to this issue, where the location of the file seems to make a difference: microsoft/vscode#96537 (comment)
@alexr00 I initiated the repository under Windows and all those files were located in C: (/mnt/c under WSL)
I tried cloning repository under WSL and poking around, and just as the issue said, all symptoms only happened when folder located inside /mnt/c. Either clone into /mnt/c directly or clone to somewhere then move into will produce this symptom.
@pingu8007 thanks for the extra investigation!
@chrmarti I don't think this problem is specific to tasks. Since its the same as https://github.com/microsoft/vscode/issues/96537#issuecomment-635714095, it also occurs with snippets and launch. I suspect a file watching issue.
In addition to above, I have checked the trace log and there were no further message after file watching started:
[2020-08-17 17:25:23.822] [remoteagent] [trace] [File Watcher (chokidar)] Start watching with chockidar: /mnt/c/Users/pingu/repositorys/container-test, excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/.hg/store/**,**/node_modules/*/**,/home/pingu/.vscode-server/extensions/**,**/*.asar, usePolling: false
The refresh of VCS panel also fallback to regular polling every few seconds.
(btw, there is a typo in the log chockidar)
Sounds like https://github.com/microsoft/WSL/issues/4739.