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 available when pressing cmd+shift+B immediately after window opens #183989

Closed
roblourens opened this issue May 31, 2023 · 21 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) help wanted Issues identified as good community contribution opportunities tasks Task system issues
Milestone

Comments

@roblourens
Copy link
Member

Maybe related to #173184

  • Quit vscode
  • Open vscode
  • When the window for the vscode repo opens, immediately press cmd+shift+B. This is a multi-root workspace with vscode and one other repo, if it mattters
  • On the first try, I get this
image
  • On the second try, I get this, where the primary "VS Code - Build". If I run a task, then press cmd+shift+B again, that build task will then show up
image

This is what I see when I wait a bit after starting vscode before pressing cmd+shift+B for the first time, all tasks are available

image

What I wish would happen is that it would just run the "VS Code - Build" task automatically, but that's a different issue

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels May 31, 2023
@meganrogge
Copy link
Contributor

@roblourens does your other repo have a default build task as well?

@meganrogge
Copy link
Contributor

I can repro in a multi root repo but not when I have a single folder open. I think this might be by design.

@meganrogge meganrogge added the info-needed Issue requires more information from poster label May 31, 2023
@roblourens
Copy link
Member Author

Yes it also has a default build task

@meganrogge
Copy link
Contributor

That's the issue. Since there are several, we don't know which one you want to run. Thus the quick pick

@roblourens
Copy link
Member Author

There are two, but you're showing me like 15 tasks. But that's not the real problem in this issue, the problem is the first two screenshots where it doesn't show up at all.

@meganrogge
Copy link
Contributor

That case occurs when it takes more than 200 ms to get the task quick pick entries.

const entries: (ITaskQuickPickEntry | IQuickPickSeparator)[] | undefined = await raceTimeout(this._createTaskQuickPickEntries(resolvedTasks, group, sort, selectedEntry), 200, () => undefined);

@meganrogge meganrogge added help wanted Issues identified as good community contribution opportunities and removed info-needed Issue requires more information from poster labels May 31, 2023
@meganrogge meganrogge added this to the Backlog milestone May 31, 2023
@roblourens
Copy link
Member Author

I messed with the code to force that call to time out, and when that happens, I see the quick pick not show up at all

@weartist
Copy link
Contributor

weartist commented Jun 1, 2023

Is it possible to increase the waiting time to get entries somewhat?

@joaomoreno
Copy link
Member

Just hit this but during a long running session, not after window opening. Unsure of what happened to get to that state:

Screen.Recording.2023-06-09.at.09.40.12.mov

@joaomoreno
Copy link
Member

Very consistent repro for me, not timing dependent:

  1. Start VS Code in vscode
  2. Cmd Shift B to start default build tasks. Wait for all compile jobs to finish.
  3. Reload workbench
  4. Press Cmd Shift B once again.

🐛 VS Code no longer knows what's the default build task.

@joaomoreno
Copy link
Member

Something else I notice after reloading, the ✔️ check mark of a successful build state is gone and the 🛠️ icon is shown instead:

image

@meganrogge meganrogge modified the milestones: Backlog, June 2023 Jun 12, 2023
@meganrogge
Copy link
Contributor

@joaomoreno after your above steps, does the quick pick open?

also, when those tasks are there with the 🛠 icon, are they reconnected to?

@meganrogge
Copy link
Contributor

here's what I'm seeing - I'll keep trying to repro
https://github.com/microsoft/vscode/assets/29464607/108e95b5-92ab-43e4-9053-6bdb156f0866

@joaomoreno
Copy link
Member

Yes, the result of step 4 is:

image

@meganrogge
Copy link
Contributor

meganrogge commented Jun 21, 2023

can repro when I do this

Screenshot 2023-06-21 at 1 48 33 PM

Screenshot 2023-06-21 at 1 48 10 PM

@meganrogge
Copy link
Contributor

meganrogge commented Jun 21, 2023

Ok - here's the issue - when the build command is triggered before the default build task has been reconnected to, that request is processed eventually after the tasks have been reconnected to. But once again, that only occurs when there's no default build task - and not sure why that is

Edit: that wasn't the issue

Screenshot 2023-06-21 at 2 14 47 PM
Screenshot 2023-06-21 at 2 15 50 PM
Screenshot 2023-06-21 at 2 17 29 PM

@roblourens
Copy link
Member Author

I have this set, dunno if that's part of it "task.experimental.reconnection": false,

@meganrogge
Copy link
Contributor

maybe related #179684

@meganrogge
Copy link
Contributor

meganrogge commented Jun 21, 2023

yep, pretty sure this is related - when I reproduced, the tasks length was 0

/duplicate #179684

reopen if you hit it again

@VSCodeTriageBot VSCodeTriageBot added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 21, 2023
@meganrogge meganrogge reopened this Jun 22, 2023
@meganrogge
Copy link
Contributor

Very consistent repro for me, not timing dependent:

  1. Start VS Code in vscode
  2. Cmd Shift B to start default build tasks. Wait for all compile jobs to finish.
  3. Reload workbench
  4. Press Cmd Shift B once again.

🐛 VS Code no longer knows what's the default build task.

This does not reproduce for me.

@meganrogge meganrogge removed the *duplicate Issue identified as a duplicate of another issue(s) label Jun 22, 2023
@meganrogge
Copy link
Contributor

meganrogge commented Jun 22, 2023

/duplicate #173384

@VSCodeTriageBot VSCodeTriageBot added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 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) help wanted Issues identified as good community contribution opportunities tasks Task system issues
Projects
None yet
Development

No branches or pull requests

5 participants