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

Variable '${defaultBuildTask}' not reliably found #158817

Closed
weinand opened this issue Aug 22, 2022 · 9 comments
Closed

Variable '${defaultBuildTask}' not reliably found #158817

weinand opened this issue Aug 22, 2022 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member *not-reproducible Issue cannot be reproduced by VS Code Team member as described tasks Task system issues

Comments

@weinand
Copy link
Contributor

weinand commented Aug 22, 2022

Recently I'm seeing this problem in Insiders:

When debugging a plain "hello world" extension, sometimes the ${defaultBuildTask} does not resolve to the default task defined in tasks.json:

{
	"type": "npm",
	"script": "watch",
	"problemMatcher": "$tsc-watch",
	"isBackground": true,
	"presentation": {
		"reveal": "never"
	},
	"group": {
		"kind": "build",
		"isDefault": true
	}
}

Instead the npm scripts from the package.json are shown in a Quickpick:

CleanShot 2022-08-22 at 21 38 59@2x

Restarting VS Code does not help, but changing a single character in the tasks.json or launch.json fixes the problem.

@alexr00
Copy link
Member

alexr00 commented Aug 23, 2022

@meganrogge the task service contributes the variable defaultBuildTask here:

this._configurationResolverService.contributeVariable('defaultBuildTask', async (): Promise<string | undefined> => {
let tasks = await this._getTasksForGroup(TaskGroup.Build);

@alexr00 alexr00 assigned meganrogge and unassigned alexr00 Aug 23, 2022
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug tasks Task system issues confirmation-pending labels Aug 23, 2022
@meganrogge meganrogge added this to the September 2022 milestone Aug 23, 2022
@meganrogge
Copy link
Contributor

When I Run Task, I see that the default build task isn't in the dropdown for about 10 seconds

@meganrogge meganrogge added confirmed Issue has been confirmed by VS Code Team member and removed confirmation-pending labels Aug 23, 2022
@meganrogge
Copy link
Contributor

could be the root cause: #157814

@weinand
Copy link
Contributor Author

weinand commented Aug 23, 2022

Yes, the 10 second delay could explain the problem. And my workaround "to change a single character in tasks.json or launch.json" only helps because it takes longer than 10 seconds...

@meganrogge
Copy link
Contributor

meganrogge commented Aug 24, 2022

I am actually no longer able to reproduce the issue I mentioned above and it's working for me in an extension 🤔

@meganrogge
Copy link
Contributor

@weinand are you still able to repro?

@weinand
Copy link
Contributor Author

weinand commented Aug 26, 2022

@meganrogge in today's Insiders I'm no longer able to reproduce the issue.

@meganrogge
Copy link
Contributor

great, pls reopen this if you see it again

@rzhao271 rzhao271 removed this from the September 2022 milestone Sep 29, 2022
@rzhao271
Copy link
Contributor

Marking as not-reproducible

@rzhao271 rzhao271 added the *not-reproducible Issue cannot be reproduced by VS Code Team member as described label Sep 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2022
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 confirmed Issue has been confirmed by VS Code Team member *not-reproducible Issue cannot be reproduced by VS Code Team member as described tasks Task system issues
Projects
None yet
Development

No branches or pull requests

4 participants