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

Build task not detected sometimes #173184

Closed
rebornix opened this issue Feb 2, 2023 · 14 comments
Closed

Build task not detected sometimes #173184

rebornix opened this issue Feb 2, 2023 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Feb 2, 2023

Type: Bug

I sometimes ran into this issue where cmd+shift+b stops runnings build task for me for VS Code repo automatically.

Screen.Recording.2023-02-02.at.10.53.13.AM.mov

VS Code version: Code - Insiders 1.75.0-insider (Universal) (e2816fe, 2023-02-01T15:16:42.458Z)
OS version: Darwin x64 22.3.0
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 6, 6, 6
Memory (System) 32.00GB (1.92GB free)
Process Argv --enable-proposed-api ms-vscode.vscode-notebook-history --enable-proposed-api vscode.notebook-editing --enable-proposed-api vscode.vscode-test-resolver --enable-proposed-api donjayamanne.kusto --enable-proposed-api donjayamanne.jupyterpowertools --enable-proposed-api rebornix.better-jupyter-errors --enable-proposed-api rchiodo.jupyter-tools --crash-reporter-id 1a907bbd-fa02-4595-81e0-63e1648afb31
Screen Reader no
VM 0%
Extensions (95)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.6.2
comment-tagged-templates bie 0.3.1
github-markdown-preview bie 0.3.0
markdown-emoji bie 0.3.0
markdown-footnotes bie 0.1.1
markdown-mermaid bie 1.17.4
markdown-preview-github-styles bie 1.0.1
vscode-github-actions csc 0.24.4
vscode-svgviewer css 2.0.0
vscode-eslint dba 2.2.6
prettier-java dot 0.1.1
gitlens eam 13.2.0
EditorConfig Edi 0.16.4
vscode-npm-script eg2 0.3.29
prettier-vscode esb 9.10.4
codespaces Git 1.13.7
copilot Git 1.71.8269
remotehub Git 0.48.0
vscode-pull-request-github Git 0.58.0
go gol 0.37.1
vscode-graphql Gra 0.8.5
vscode-graphql-syntax Gra 1.0.6
vscode-mocha-test-adapter hbe 2.14.1
vscode-test-explorer hbe 2.21.1
vscode-drawio hed 1.6.6
handydandy-notebook jak 0.1.4
beancount Len 0.9.1
fluent-icons mig 0.0.18
vscode-fluent-icons mig 0.0.1
theme-monokai-pro-vscode mon 1.2.0
vscode-azurefunctions ms- 1.9.0
vscode-azureresourcegroups ms- 0.5.6
vscode-azurestaticwebapps ms- 0.11.4
vscode-docker ms- 1.23.3
vscode-language-pack-qps-ploc MS- 1.75.2023020109
vscode-language-pack-zh-hans MS- 1.75.2023020109
csharp ms- 1.25.2
isort ms- 2022.8.0
python ms- 2023.3.10331021
vscode-pylance ms- 2023.2.11
jupyter ms- 2023.1.2000312134
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.14
notebook-renderers ms- 0.0.1
vscode-jupyter-cell-tags ms- 0.1.6
vscode-jupyter-slideshow ms- 0.1.5
remote-containers ms- 0.276.0
remote-ssh ms- 0.97.2023020215
remote-ssh-edit ms- 0.84.0
azure-account ms- 0.11.3
azure-repos ms- 0.24.0
hexeditor ms- 1.9.11
js-debug-nightly ms- 2023.2.117
live-server ms- 0.5.2023020201
powershell-preview ms- 2023.1.0
remote-explorer ms- 0.2.0
remote-repositories ms- 0.26.0
test-adapter-converter ms- 0.1.6
vscode-github-issue-notebooks ms- 0.0.128
vscode-js-profile-flame ms- 1.0.5
vscode-markdown-notebook ms- 0.0.26
vscode-notebook-history ms- 0.0.1
vscode-selfhost-test-provider ms- 0.3.13
vscode-typescript-tslint-plugin ms- 1.3.4
vsliveshare ms- 1.0.5828
debugger-for-chrome msj 4.13.0
vetur oct 0.36.1
excalidraw-editor pom 3.4.0
geo-data-viewer Ran 2.6.0
vscode-data-preview Ran 2.3.0
better-jupyter-errors reb 0.0.1
toggle reb 0.0.2
typing-practice reb 0.0.1
vscode-chat-iw reb 0.0.1
vscode-code-renderer reb 0.0.2
vscode-jupyter-docker-stack-connect reb 0.0.1
java red 1.14.0
vscode-xml red 0.24.0
kuskus-extensions-pack ros 1.0.10
kuskus-kusto-language-server ros 1.0.31
kuskus-kusto-syntax-highlighting ros 1.1.21
vsc-nwjs rua 1.0.18
swift-lang ssw 1.0.0
tldraw-vscode tld 1.25.2
luna-paint Tyr 0.16.0
sourcekit-lsp unp 0.0.1
vscode-lldb vad 1.8.1
vscode-swiftlint vkn 1.8.3
vscode-java-debug vsc 0.48.0
vscode-java-dependency vsc 0.21.1
vscode-java-pack vsc 0.25.7
vscode-java-test vsc 0.37.1
vscode-maven vsc 0.40.4
notebook-editing vsc 1.0.0
vscode-test-resolver vsc 0.0.1

(7 theme extensions excluded)

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vsdfh931cf:30280410
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
pyindex848:30611229
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887
a9j8j154:30646983
hidelangstatbar:30657380

@alexr00 alexr00 assigned meganrogge and unassigned alexr00 Feb 3, 2023
@meganrogge
Copy link
Contributor

Pls comment if you find a way to repro this

@rebornix
Copy link
Member Author

rebornix commented Feb 3, 2023

@meganrogge I really don't. Ran into this twice in last two weeks, is there any log to check if I run into this again?

@bpasero
Copy link
Member

bpasero commented Feb 3, 2023

Oh nice, same here! I think this happens when I manage to rerun build tasks (the default build task of vscode) right after window reload, very early while the workbench is loading up.

@meganrogge
Copy link
Contributor

Yeah it takes some time to resolve workspace tasks, so if you run it too early, it makes sense that you'd see this happen. We don't want to prevent the workbench from starting up, so not sure what could be done here

@bpasero
Copy link
Member

bpasero commented Feb 3, 2023

I should also mention that when this happens, it does not "just work" when I wait longer. So at that point, I see the picker appearing even later. Not sure if that is explainable.

@rebornix
Copy link
Member Author

rebornix commented Feb 3, 2023

@meganrogge for me it still doesn't work after waiting for 10 seconds or so. I would expect the workbench to finish and we have parsed the tasks.json file reasonably fast. It's fine for me to wait for a few seconds to wait for the workbench to be ready and tasks.json to be parsed before seeing a quick pick or an auto run.

@meganrogge
Copy link
Contributor

meganrogge commented Feb 3, 2023

Looked at your gif again @rebornix and I noticed that you only have detected tasks showing up in that case.

What that means looking at the code is that _source had not yet been set to User or Workspace for any of the tasks.

if (!key || !recentSet.has(key)) {
if ((task._source.kind === TaskSourceKind.Workspace) || (task._source.kind === TaskSourceKind.User)) {
configured.push(task);
} else {
detected.push(task);
}
}
}
const sorter = this.createSorter();
if (includeRecents) {
fillEntries(entries, recent, nls.localize('recentlyUsed', 'recently used tasks'));
}
configured = configured.sort((a, b) => sorter.compare(a, b));
fillEntries(entries, configured, nls.localize('configured', 'configured tasks'));
detected = detected.sort((a, b) => sorter.compare(a, b));
fillEntries(entries, detected, nls.localize('detected', 'detected tasks'));

@meganrogge
Copy link
Contributor

So I think what's happening is the tasks.json file has been parsed but the task hasn't been fully resolved yet

@rebornix
Copy link
Member Author

rebornix commented Feb 8, 2023

@meganrogge this happened again today, and VS Code has been already running for half a day. Here are the trace logs related to Tasks but they don't seem to be helpful.

2023-02-07 17:28:17.241 [trace] KeybindingService#dispatch ⇧⌘B workbench.action.tasks.build
2023-02-07 17:28:17.242 [trace] CommandService#executeCommand workbench.action.tasks.build
2023-02-07 17:28:17.243 [trace] onWillActivateByEvent:  onTaskType:grunt
2023-02-07 17:28:17.243 [trace] onWillActivateByEvent:  onTaskType:gulp
2023-02-07 17:28:17.243 [trace] onWillActivateByEvent:  onTaskType:jake
2023-02-07 17:28:17.244 [trace] onWillActivateByEvent:  onTaskType:npm
2023-02-07 17:28:17.244 [trace] onWillActivateByEvent:  onTaskType:typescript
2023-02-07 17:28:17.245 [trace] onWillActivateByEvent:  onTaskType:eslint
2023-02-07 17:28:17.245 [trace] onWillActivateByEvent:  onTaskType:func
2023-02-07 17:28:17.245 [trace] onWillActivateByEvent:  onTaskType:docker-build
2023-02-07 17:28:17.245 [trace] onWillActivateByEvent:  onTaskType:docker-run
2023-02-07 17:28:17.245 [trace] onWillActivateByEvent:  onTaskType:docker-compose
2023-02-07 17:28:17.246 [trace] onWillActivateByEvent:  onTaskType:Live Preview
2023-02-07 17:28:17.246 [trace] onWillActivateByEvent:  onTaskType:vsls
2023-02-07 17:28:17.246 [trace] onWillActivateByEvent:  onTaskType:swift
2023-02-07 17:28:17.246 [trace] onWillActivateByEvent:  onTaskType:swift-plugin

@meganrogge
Copy link
Contributor

this is probably the root cause #173384

@meganrogge meganrogge added this to the On Deck milestone Mar 3, 2023
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug and removed confirmation-pending labels Mar 3, 2023
@meganrogge
Copy link
Contributor

Thank you for your patience - I will try to work on this in April

@meganrogge
Copy link
Contributor

meganrogge commented May 4, 2023

/duplicate #173384

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 4, 2023
@vscodenpa
Copy link

Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting \closedWith someCommitSha, or directly add the insiders-released label if you know this has already been releaased

@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label May 4, 2023
@vscodenpa vscodenpa removed the unreleased Patch has not yet been released in VS Code Insiders label May 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2023
@meganrogge meganrogge reopened this Jun 22, 2023
@meganrogge meganrogge modified the milestones: On Deck, June 2023 Jun 22, 2023
@meganrogge
Copy link
Contributor

/duplicate #173384

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues
Projects
None yet
Development

No branches or pull requests

5 participants