actboy168 / vscode-tasks

MIT License
37 stars 14 forks source link

1.79.0-insiders only shows single task - even when there are multiple #44

Open ThaDaVos opened 1 year ago

ThaDaVos commented 1 year ago

Since my editor updated to the latest insiders (as I have a few extensions which preview is only available on Insiders) - I only see a single task in the taskbar.

My tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "publish",
            "command": "dotnet",
            "type": "process",
            "args": [
              "publish",
              "${workspaceFolder}/RDPBootupConfigurator.csproj",
              "/property:GenerateFullPaths=true",
              "/consoleloggerparameters:NoSummary",
              "-c",
              "Release",
              "-o",
              "${workspaceFolder}/out/publish"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "build",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}/RDPBootupConfigurator.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        }
    ]
}

If I bootup my normal vscode which is 1.78.2 - it shows them without issues

actboy168 commented 1 year ago

You should report it to VSCode team.

jrieken commented 1 year ago

@actboy168 you are correct in that we make changes here but this exposes an issue how the createStatusBarItem-API is being used. In https://github.com/actboy168/vscode-tasks/blob/master/extension.js#L365 multiple items with the same identifier are being created which isn't how the API meant to be used. The point of the identifier is to be unique within the extension.

ThaDaVos commented 1 year ago

Thank you @jrieken for responding back here - the change seems really logical - I hope @actboy168 can rework the extension so this can be fixed - or do you want me to submit a PR instead?

ThaDaVos commented 1 year ago

I checked the code and made this small PR with a fix by simply adding the index to it - hope this is a good fix: https://github.com/actboy168/vscode-tasks/pull/46

It's purely based on code - haven't tested it locally or something

actboy168 commented 1 year ago

@jrieken Before 1.78, the statusbar with the same id will be considered as the same class, and it can be disabled or enabled uniformly in the right-click menu. Now we have lost it.

jrieken commented 1 year ago

and it can be disabled or enabled uniformly in the right-click menu. Now we have lost it.

That was unintended and should have never worked like that

jrieken commented 1 year ago

the statusbar with the same id will be considered as the same class, and it can be disabled or enabled uniformly in the right-click menu. Now we have lost it.

Looked at this again and you can get this behaviour by not using an identifier at all, then they will be all treated equal and hiding one will hide them call. The, be aware that this isn't how you we like status bar item be used

actboy168 commented 1 year ago

Looked at this again and you can get this behaviour by not using an identifier at all, then they will be all treated equal and hiding one will hide them call. The, be aware that this isn't how you we like status bar item be used

OK, as long as it works. I don't mind doing more things that aren't pretty.