Skip to content

Restarting task should read the updated content #251755

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

anthonykim1
Copy link
Contributor

@anthonykim1 anthonykim1 commented Jun 17, 2025

Resolves: #169267

Fixing two things in this PR:

  • Issue where re-run last task did not check for task update, did not re-read the tasks.json content
  • Issue where re-starting running task did not check for task update, or deletion

@anthonykim1 anthonykim1 added this to the June 2025 milestone Jun 17, 2025
@anthonykim1 anthonykim1 self-assigned this Jun 17, 2025
@anthonykim1 anthonykim1 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Jun 17, 2025
@@ -23,6 +25,38 @@ export const enum TaskErrors {
UnknownError
}

export class VerifiedTask {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to move this here for code layer!

@anthonykim1
Copy link
Contributor Author

anthonykim1 commented Jun 18, 2025

Proof of testing both restarting on going task and re-running last task:

restarting:
https://github.com/user-attachments/assets/c256624f-17ed-4997-96d4-62e1da4f1c86

rerunning last task:

Screen.Recording.2025-06-18.at.12.31.14.PM.mov

@anthonykim1 anthonykim1 requested a review from meganrogge June 18, 2025 19:32
@meganrogge
Copy link
Contributor

@anthonykim1 thanks for working on this! Can you test this on a longrunning task for which you get the notification "the task is already active" vs a single run task like the one in your gif?

@anthonykim1
Copy link
Contributor Author

anthonykim1 commented Jun 18, 2025

@meganrogge Thanks for reviewing!

Yeah, actually I'm not sure why that notification didn't show up in the first gif (the one that prints for 30 second).
I'm wondering if it needs to be continuous like compile task. Let me see if I get better luck with those.

Edit: Oh, wait I'm finally able to get the notification, but this only shows up sometimes when I re-run, not when I restart from command palette:

Screenshot 2025-06-18 at 1 54 56 PM

Just found a bug where re-starting non-changed compile task leads to error, will investigate and fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"The task is already active" button "Restart Task" doesn't re-read tasks.json
2 participants