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

Duplicated Task / Inconsistent Naming / Missing Details #167061

Closed
hediet opened this issue Nov 23, 2022 · 16 comments
Closed

Duplicated Task / Inconsistent Naming / Missing Details #167061

hediet opened this issue Nov 23, 2022 · 16 comments
Assignees
Labels
papercut 🩸 A particularly annoying issue impacting someone on the team tasks Task system issues
Milestone

Comments

@hediet
Copy link
Member

hediet commented Nov 23, 2022

Steps Bug 1:

Actual result:
image

Expected result:

  • npm: dev - extension should not appear twice
  • every entry should have details, not just npm: dev - webview

Steps Bug 2:

  • Run both of the dev - extension tasks (kill the other before running each)
    • Notice that one of the tasks does not pick up the problemMatcher configured in tasks.json (VS Code shows the loading indicator forever in that case)

Steps Bug 3:

  • Use extension API vscode.tasks.fetchTasks to query all tasks
    • Notice that the name of the first duplicate is npm: dev - extension (as configured in tasks.json) and the other is just dev - extension

Probably all bugs have the same source, thus filing just one issue.

@hediet hediet added bug Issue identified by VS Code Team member as probable bug tasks Task system issues papercut 🩸 A particularly annoying issue impacting someone on the team labels Nov 23, 2022
@hediet
Copy link
Member Author

hediet commented Nov 23, 2022

If details are shown or not is also not deterministic:

image.png
image

@meganrogge meganrogge added this to the December 2022 milestone Nov 28, 2022
@meganrogge
Copy link
Contributor

meganrogge commented Dec 14, 2022

npm: dev - extension should not appear twice

For me, it only appears twice if I have two tasks with that label in the tasks.json, which is not how that repo has things configured by default. That is as designed.

Screenshot 2022-12-14 at 11 33 13 AM

every entry should have details, not just npm: dev - webview

It only shows details for tasks that have the detail property set by design
Screenshot 2022-12-14 at 11 33 59 AM

@meganrogge
Copy link
Contributor

meganrogge commented Dec 14, 2022

What you have described suggests you have two tasks like the above configured.

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Dec 14, 2022
@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2022
@hediet
Copy link
Member Author

hediet commented Jan 3, 2023

Let's meet and discuss this, as it consistently reproduces for me.

@hediet hediet reopened this Jan 3, 2023
@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
@meganrogge meganrogge reopened this Jan 10, 2023
@meganrogge meganrogge removed the info-needed Issue requires more information from poster label Jan 12, 2023
@meganrogge
Copy link
Contributor

It exists here as both a customized task and a contributed one

Screenshot 2023-01-12 at 10 44 15 AM

@meganrogge
Copy link
Contributor

and custom tasks have no details, which is why those were missing

Screenshot 2023-01-12 at 10 45 46 AM

@meganrogge
Copy link
Contributor

That task lives in the .vscode/tasks.json file of the vscode-debug-visualizer workspace

Screenshot 2023-01-12 at 10 48 12 AM
Screenshot 2023-01-12 at 10 48 58 AM

@meganrogge
Copy link
Contributor

I see why you were confused by this @hediet , as the tasks are detected from many places within that particular workspace. Please let me know if you have any other questions

@meganrogge meganrogge removed the bug Issue identified by VS Code Team member as probable bug label Jan 12, 2023
@meganrogge meganrogge reopened this Jan 12, 2023
@meganrogge meganrogge added the bug Issue identified by VS Code Team member as probable bug label Jan 12, 2023
@meganrogge
Copy link
Contributor

meganrogge commented Jan 12, 2023

Consulted with @alexr00 and in this case, we'd expect those to be merged into one, but the / in the path:"extension/" is what's causing this to happen because it's not equal to the path of the other task. Removing that fixes this

@meganrogge
Copy link
Contributor

Screenshot 2023-01-12 at 11 30 01 AM

@meganrogge meganrogge removed the bug Issue identified by VS Code Team member as probable bug label Jan 12, 2023
@hediet
Copy link
Member Author

hediet commented Jan 13, 2023

is what's causing this to happen because it's not equal to the path of the other task. Removing that fixes this

I'd expect extension/ and extension to behave the same.

Also, I just tested this with 1.40.2, where it works (only a single npm: dev - extension is shown):

image

Thus it seems this is a regression.

@alexr00
Copy link
Member

alexr00 commented Jan 13, 2023

The trailing slash in extension/ was a bug. This bug was fixed with #146165.

An unfortunate side effect of fixing the trailing slash bug is that now some tasks.json files where the tasks were created during a time where the / bug was occurring will have an extra / in the path of npm script tasks.

An extension provided task, such as an npm type task, is identified by the properties the extension defines for the task type. For npm, this is script and path. When the npm extension provides tasks to VS Code, they are now properly without the trailing /. However, your tasks.json still has the erroneous /. The two tasks now have different IDs and cannot be merged.

@hediet
Copy link
Member Author

hediet commented Jan 13, 2023

Ahh, that makes sense.

@alexr00
Copy link
Member

alexr00 commented Jan 13, 2023

Your task with the trailing slash should still work (mitigating the issue), but we can't really merge them without making core VS Code have specific knowledge of how npm tasks work.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
papercut 🩸 A particularly annoying issue impacting someone on the team tasks Task system issues
Projects
None yet
Development

No branches or pull requests

4 participants