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

Custom task list token in Visual Studio 2022 doesn't work for Python. #7151

Closed
vsfeedback opened this issue Sep 7, 2022 · 24 comments
Closed
Assignees
Labels
bug enhancement fixed in next version A fix has been implemented an will appear in an upcoming version

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


Hi Team,

I found that my custom task list tokens don't work in VS 2022 for Python(But it works in VS 2019).

Steps to reproduce:

  1. Open VS 2022, create a Python project.
  2. In Tools > Options > Environment > Task List > input a new name for example "Test1" > click Add to add this custom task list token.
  3. In .py file > input some comments for example "#Test1: this is a test" > save the project.
  4. Click View > Task List.
  5. In Task List window, the Test1 task list token doesn't appear.

You can test in C# projects, or in VS 2019 Python projects, they should work well.

If it's a potential issue, please fix it.

Thanks


Original Comments

Feedback Bot on 8/29/2022, 02:23 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@K-E-K
Copy link

K-E-K commented Oct 5, 2022

I am having the same problem but with even the default TODO tag, though it's working normally in VS 2019.

@kue43
Copy link

kue43 commented Oct 12, 2022

Visual Studio 2022 task list not working at all for Python

@AdamYoblick AdamYoblick self-assigned this Oct 28, 2022
@AdamYoblick AdamYoblick added the needs investigation Could be an issue - needs investigation label Oct 28, 2022
@AdamYoblick
Copy link
Member

AdamYoblick commented Nov 2, 2022

More info via internal email (this is for people working on the bug, not the public)

LSP support for Task List is done via diagnostics. If you add the TaskItem tag to your diagnostic, they should be shown in Task List instead of Error List.

@janestebans
Copy link

janestebans commented Nov 6, 2022

C++, not working for me either. I have the Options->TextEditor->C/C++->View->Enumerate Comment Tasks = true. Tried switching it off and on and restarte VS, did not work.
It is wierd because it shows the comments from boost library files but not mine. Adding a new task list token does not work either.

  • Microsoft Visual Studio Community 2022 (64-bit)
  • VS version: 17.3.6
  • Windows 11.

Thanks.

EDIT:
Opening the project with VS 2019, setting the option Enumerate Comment tasks to false, then true again. Closing and reopening it with VS 2022 fixed it.

EDIT 2:
Updating Visual Studio to 17.4.1 has solved the problem. No need to restart toggling the EnumerateComment task option as previous edit workaround.

@AdamYoblick AdamYoblick removed the needs investigation Could be an issue - needs investigation label Nov 7, 2022
@AdamYoblick
Copy link
Member

Thanks for the additional info. I was going to say that the C++ language server is different from the python one, but it sounds like you found a workaround 😄

On the python side, I'm have a proof of concept working for the task list. I needed to add a feature to pylance (the language server). Now I just need to flesh it out.

@K-E-K
Copy link

K-E-K commented Nov 29, 2022

I have upgraded to : Version 17.4.1
(Microsoft Visual Studio Professional 2022 ) and the task list is still not working at all for Python.

@AdamYoblick
Copy link
Member

Yep, I'm still working on this. I get pulled into infra work and other higher priority tasks often so my work gets interrupted. I'm hoping to complete the work this week if all goes well. I'll update this issue when the fix is in.

@K-E-K
Copy link

K-E-K commented Dec 1, 2022

Ok glad to hear that. Thank you for keeping us updated.

@AdamYoblick
Copy link
Member

This is now working for me locally, I'll reply when I know what version of Visual Studio this will be released in.

@pbarranis
Copy link

@AdamYoblick I have found some different but similar issues with the Task List since upgrading to 17.4. I'll describe briefly - you tell me if this is close enough to the issues you are fixing that it does or doesn't warrant opening a separate ticket, please.

I have two solutions I work on routinely, both primarily C# with some TS/HTML/SASS. In one solution, the Task List went totally blank after upgrading. Now that I'm looking more closely, I see that even the column headings aren't visible.

Tools -> Options -> Environment -> Task List shows my usual, heavily-customized list, and there should be dozens of entries in the Task List at varying priorities.

In the other solution, all of my task list items show up. However, all the items that should be high & low priority show up as normal priority, and all the items that should be normal priority show up as low priority.

Per a post on SO for whom this worked, I tried doing a Repair on VS through the Installer. Unfortunately, no joy.

TIA. I can open a new ticket if needed. Excited to have this potentially fixed soon, as obviously I'm a bit of a Task List power user.

@randsu
Copy link

randsu commented Dec 19, 2022

Task List for Visual Studio Professional 2022 (64 bit) version 17.4.3
does not pick up // TODO in code.

@AdamYoblick
Copy link
Member

@AdamYoblick Adam Yoblick FTE I have found some different but similar issues with the Task List since upgrading to 17.4. I'll describe briefly - you tell me if this is close enough to the issues you are fixing that it does or doesn't warrant opening a separate ticket, please.

I have two solutions I work on routinely, both primarily C# with some TS/HTML/SASS. In one solution, the Task List went totally blank after upgrading. Now that I'm looking more closely, I see that even the column headings aren't visible.

Tools -> Options -> Environment -> Task List shows my usual, heavily-customized list, and there should be dozens of entries in the Task List at varying priorities.

In the other solution, all of my task list items show up. However, all the items that should be high & low priority show up as normal priority, and all the items that should be normal priority show up as low priority.

Per a post on SO for whom this worked, I tried doing a Repair on VS through the Installer. Unfortunately, no joy.

TIA. I can open a new ticket if needed. Excited to have this potentially fixed soon, as obviously I'm a bit of a Task List power user.

Sorry for the delay, I've been on vacation for the past month. Task list diagnostics are handled by each language team's language server, so any fixes I make to the python one won't trickle down to the other languages. I will reach out to the visual studio team to see if they can re-route this request for the other languages as well.

For python, my changes are in code review and will be committed in the next day or so. But it will take time to make it into a visual studio release. I'll reply back once I know what version it will be in.

@AbhimanyuVS
Copy link

Hello,

I have tried all of the different solutions listed in this thread, but I am still unable to see any tasks (specified by either custom or default tokens) in VS2022. It works in VS2019, for Python, C++, and C#. However, it does not work in VS2022, for any language.

For reference, I posted a bug report about this here: https://developercommunity.visualstudio.com/t/Task-list-is-not-working-in-VS2022/10192598

This was then piped here: #7254

That was then closed citing this thread as a duplicate.

I look forward to a solution to this problem, as both VS2022 and the task list are very nice.

Thank you.

@smimon
Copy link

smimon commented Jan 24, 2023

I have been experiencing blank task list in VS 2022 with C# for months.

Doing a full repair fixes them temporarily - close down and re-open the solution a few times, they all disappear again.

Although internally to the MS team working on this, this may not be considered high priority, this is a fairly critical piece of productivity for a lot of developers, so may we please request that this is flagged as such and escalated for a quicker fix across all languages?

@AdamYoblick
Copy link
Member

This is working locally with changes to both pylance and the VS Editor:

image

I still need to go through the VS PR process, etc, but good progress 😄

@AdamYoblick
Copy link
Member

Note that task list work with just pylance changes, but priority requires VS changes. I'm going to get the task list PR in ASAP, then work on getting #7300 in.

@AdamYoblick AdamYoblick added the fixed in next version A fix has been implemented an will appear in an upcoming version label Feb 10, 2023
@AdamYoblick
Copy link
Member

This has been merged in and will be in the next release public release of VS 2022.

@AbhimanyuVS
Copy link

AbhimanyuVS commented Feb 15, 2023

@AdamYoblick

I installed update 17.4.5, but I still cannot see the task list in Python projects. Will this issue be addressed in another update? Sorry if I misunderstood your last comment.

EDIT: I tested out different project types, and I noticed something curious. In Python and C++ projects, the task list does not have any task in it. In C# projects, the task list has all tasks, but the priorities of all tasks are normal, except for the default "TODO" task, which has a low priority. This is despite the fact that you cannot actually change the priority of the "TODO" task in the options. Not sure if these are related, but I just wanted to bring them to someone's attention without needing to make a new ticket on the Developer Community site.

@AdamYoblick
Copy link
Member

AdamYoblick commented Feb 15, 2023

@AbhimanyuVS This change just got merged into pylance, but there's a sequence of releases that have to happen first. Unfortunately, that means we can't just release bugfixes whenever we want.

Pylance has to release first, which happens once per week. Once there's a new version of pylance, PTVS can consume it and PTVS can insert into Visual Studio. Then Visual Studio needs to release. The GA (general availability) release of Visual Studio 2022 17.6 should be in the middle of May, 2023.

I know that's not what you wanted to hear, but since we insert into Visual Studio, we release with them as well. 😄

@AbhimanyuVS
Copy link

@AdamYoblick

Understood, not a problem. Now that I know the ETA, I am alright with waiting for it. Thank you for your work on the same; I look forward to receiving the fix in May.

Since this is closed, should I create separate tickets for (a) the task list not working for C++ and (b) the task list behaving strangely with C#?

@AdamYoblick
Copy link
Member

@AbhimanyuVS I tested C# myself and it works for me locally, which means it will be fixed in the next release as well. But if you want to create a new issue, you definitely can. C# development is done at
https://github.com/dotnet/roslyn

I'm not sure about C++ though. I think you'd need to create a feedback ticket through Visual Studio and it will get routed to the correct team as long as you specify C++ in the title. 😄

@AbhimanyuVS
Copy link

@AdamYoblick

Good to know that the task list will work with C#. Thank you for pointing me to the roslyn repo.

I will put in a new ticket for the task list in C++.

Thank you for your time and consideration.

@CaligoLab
Copy link

Just for the record:
VS Version 17.4.4 (Win x64) up to date.
This is my first try at creating tasks (Python)
Neither TODO, nor custom markers are picked up - the task list is empty.

@AbhimanyuVS
Copy link

For reasons unknown, this issue has resurfaced for me. In Oct 2024, the task list was working fine for Python source code in Visual Studio 2022. However, at some point since then, it has stopped working. Tasks no longer show up for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement fixed in next version A fix has been implemented an will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests