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 Tasks Hang When Specific Built-in Extensions are Disabled #83939

Closed
ssoher opened this issue Nov 4, 2019 · 12 comments
Closed

Build Tasks Hang When Specific Built-in Extensions are Disabled #83939

ssoher opened this issue Nov 4, 2019 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Milestone

Comments

@ssoher
Copy link

ssoher commented Nov 4, 2019

  • VSCode Version: 1.39.2
  • OS Version: Windows 10 x64 1903 Build 18362.388

Steps to Reproduce:

  1. Disable the built-in extensions below, reload
Grunt support for VS Code
Gulp supoprt for VSCode
Jake support for VS Code
NPM support for VS Code
TypeScript and JavaScript Language Features
  1. Try running a build task, the status bar will show "Fetching build tasks..." forever

Below is my simple tasks.json that calls a Windows batch file to build a C project using gcc.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build debug",
            "type": "shell",
            "command": "${workspaceFolder}/build.bat",
            "args": [],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
@vscodebot
Copy link

vscodebot bot commented Nov 4, 2019

@alexr00
Copy link
Member

alexr00 commented Nov 5, 2019

@ssoher I can't reproduce this. Is it possible you have an extension that's depending on the built in typescript and javascript languages features are disabled? Can you try disabling all installed extensions and see if it still happens?

@alexr00 alexr00 added info-needed Issue requires more information from poster tasks Task system issues labels Nov 5, 2019
@ssoher
Copy link
Author

ssoher commented Nov 5, 2019

@alexr00 I've disabled every single extension both external and built-in and restarted Code. The behavior is the same. Run Build Tasks resumes working immediately as I enable the TypeScript and JavaScript Language Features built-in extension.

@alexr00
Copy link
Member

alexr00 commented Nov 5, 2019

Do you have a sample repo I could try with? Have you tried with only the typescript extension and all installed extensions disabled (leaving other built-in extensions enabled)? Do you have any task or extension related settings set?

@ssoher
Copy link
Author

ssoher commented Nov 5, 2019

Yes, I've tried that combination of extensions too.

Here is a small project I'm encountering this issue on.
c_opengl.zip

My settings look unrelated, below is my settings.

{
    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "editor.fontFamily": "'Fira Code'",
    "editor.accessibilitySupport": "off",
    "editor.detectIndentation": false,
    "editor.dragAndDrop": false,
    "window.zoomLevel": 0,
    "editor.find.autoFindInSelection": true,
    "glsl-linter.validatorPath": "E:\\glsllangvalidator\\glslangValidator.exe",
    "window.menuBarVisibility": "default",
    "editor.minimap.enabled": false,
    "breadcrumbs.enabled": true,
    "editor.renderWhitespace": "none",
    "editor.renderControlCharacters": false,
    "editor.fontSize": 12,
    "editor.lineHeight": 18,
    "workbench.editor.closeEmptyGroups": false,
    "workbench.colorTheme": "Github Light Theme - Gray",
    "editor.cursorStyle": "block-outline",
    "javascript.suggest.autoImports": false,
    "todo-tree.general.tags": [
        "TODO",
        "FIXME",
        "BUG",
        "NOTE",
        "HACK"
    ],
    "todo-tree.highlights.customHighlight": {
        "TODO": {
            "background": "green",
            "foreground": "white",
            "opacity": "0.25",
            "fontWeight": "500",
            "icon": "checklist",
            "iconColour": "green",
            "type": "text",
        },
        "FIXME": {
            "background": "magenta",
            "foreground": "white",
            "opacity": "0.25",
            "fontWeight": "500",
            "icon": "alert",
            "iconColour": "magenta",
            "type": "text",
        },
        "BUG": {
            "background": "red",
            "foreground": "white",
            "fontWeight": "500",
            "icon": "bug",
            "iconColour": "red",
            "type": "text",
        },
        "NOTE": {
            "background": "cyan",
            "foreground": "white",
            "fontWeight": "500",
            "icon": "bug",
            "type": "text",
            "hideFromTree": "true"
        },
        "HACK": {
            "background": "green",
            "foreground": "white",
            "opacity": "0.25",
            "fontWeight": "500",
            "icon": "bug",
            "type": "text",
            "hideFromTree": "true"
        },
    },
    "workbench.editor.revealIfOpen": true,
    "sync.gist": "08afe2b70f2bc405af6ed3627b7f0008"
}

@alexr00
Copy link
Member

alexr00 commented Nov 5, 2019

Thanks for the sample. Even with your exact settings and with that sample I cannot see the same issue. Some more questions:
If you open the Developer Tools, do you see anything suspicious in the console?
If you run the Tasks: Run Task command what happens? Are there any tasks listed there besides your build task?
Does the same thing happen if you remove the group from your task?

@ssoher
Copy link
Author

ssoher commented Nov 5, 2019

When I re-enable the TypeScript and JavaScript Language Features built-in extension I get this error log in the Developer Tools console.
-1572951426068.log

There are no tasks listed besides my "build debug version"

I can't test what happens when I remove the group from my task because I'm not able to run it when that built-in extension is disabled. Run Task action tries to list tasks with an empty textbox on the screen and the UI element under the textbox that indicates it's looking for stuff going back and forth forever. It cannot find any tasks when that extension is disabled.

@alexr00
Copy link
Member

alexr00 commented Nov 5, 2019

The errors from the dev tools appear to be from naumovs.cursor-tools-2.0.0. Can you keep this extension disabled while we figure out what's going on?

Lets try a fresh state. Can you install the insiders build from https://code.visualstudio.com/insiders/ and try do your usual repro (it installs side by side with stable, so you won't be losing anything)? If it doesn't happen there, then either there's a real issue that's fixed in insiders or you have some bad state somewhere. When you try on insiders, can you see if you more errors in the developer

@ssoher
Copy link
Author

ssoher commented Nov 5, 2019

The same problem persists in the Insiders version. I have some new findings though.
The problem goes away if I enable below built-in extensions. It is enough for any single one of these extensions to be enabled to be able to run build task again.
I wonder what is one thing in common for these extensions?

Grunt support for VS Code
Gulp supoprt for VSCode
Jake support for VS Code
NPM support for VS Code
TypeScript and JavaScript Language Features

While trying the repro, did you disable all extensions available int VS Code? Maybe you've left some of these enabled so you didn't encounter the same problem?

@alexr00
Copy link
Member

alexr00 commented Nov 5, 2019

I only disabled the typescript extension since that's what the issue is about :) The common thing between those extensions is that they all provide tasks. I'll try disabling all.

@ssoher ssoher changed the title Build Tasks Hang When Typescript and Javascript Lang. Features is Disabled Build Tasks Hang When Specific Built-in Extensions are Disabled Nov 5, 2019
@ssoher
Copy link
Author

ssoher commented Nov 5, 2019

Right, I just found out about the the other extensions :) I'll edit the issue description and title now

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Nov 5, 2019
@alexr00 alexr00 added this to the November 2019 milestone Nov 5, 2019
@alexr00 alexr00 closed this as completed in 90ca98a Nov 5, 2019
@alexr00
Copy link
Member

alexr00 commented Nov 5, 2019

I think this issue has been around as long as Tasks has been around. No one must be disabling those extensions. I've pushed a change that should fix it and that change will be available in insiders probably by the end of the week. Thanks for helping track it down!

For what it's worth, you can disable any task related code path that goes through task providers using the task.autoDetect setting (insiders only atm, but coming to stable soon). That won't stop those extensions from activating when you run at task related command, but it will stop them from trying to provide tasks (unless you have a task for one of them in tasks.json).

@roblourens roblourens added the verified Verification succeeded label Dec 4, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 20, 2019
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 tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants