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

Task names are displayed incorrectly #156166

Closed
bwateratmsft opened this issue Jul 25, 2022 · 10 comments · Fixed by #161818
Closed

Task names are displayed incorrectly #156166

bwateratmsft opened this issue Jul 25, 2022 · 10 comments · Fixed by #161818
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders regression Something that used to work is now broken tasks Task system issues verified Verification succeeded

Comments

@bwateratmsft
Copy link
Contributor

Type: Bug

Originally from microsoft/vscode-docker#3580.

When executing a new task, the displayed name is incorrect. Potentially related to #154146?

VS Code version: Code - Insiders 1.70.0-insider (3cbf306, 2022-07-25T05:27:52.229Z)
OS version: Windows_NT x64 10.0.22000
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz (20 x 3696)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 126.84GB (110.05GB free)
Process Argv --crash-reporter-id a639fe75-6727-46d4-bc6c-acdb3cb6366a
Screen Reader no
VM 0%
Extensions (5)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.6.2
vscode-eslint dba 2.2.6
vscode-docker ms- 1.22.5-alpha
remote-containers ms- 0.243.0
azure-account ms- 0.11.0
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256198
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonvspyt551:30291412
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
wslgetstarted:30449409
vscscmwlcmt:30465136
cppdebug:30492333
pylanb8912:30522163
vsclangdf:30492506
841h4636:30532337

@bwateratmsft
Copy link
Contributor Author

/cc @meganrogge and @Tyriar

@meganrogge
Copy link
Contributor

yes looks like the same as #154146

@meganrogge meganrogge added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 25, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@bwateratmsft
Copy link
Contributor Author

bwateratmsft commented Jul 25, 2022

The Docker extension is not using the task name change emitter, though. Previously for all our tasks, it was just displaying the task type, which was good enough.

@bwateratmsft
Copy link
Contributor Author

@meganrogge are you sure this is the same as #154146? The more I look into it, the less it seems so. In the original bug, the user ran one task that executes as a CustomExecution--this one displays its task name correctly--and then runs another task that executes as a ShellExecution--and this one keeps the title from the CustomExecution.

@meganrogge meganrogge reopened this Jul 28, 2022
@meganrogge meganrogge removed the *duplicate Issue identified as a duplicate of another issue(s) label Jul 28, 2022
@meganrogge
Copy link
Contributor

@bwateratmsft what is it displaying if not the task type?

@meganrogge meganrogge added info-needed Issue requires more information from poster tasks Task system issues confirmation-pending labels Aug 2, 2022
@Tyriar
Copy link
Member

Tyriar commented Aug 3, 2022

@meganrogge just a guess; could this be only a problem on reconnected terminals where we restore the title but not the fact that the title source was "API", so title sequences override it?

@Tyriar Tyriar added the regression Something that used to work is now broken label Aug 3, 2022
@Tyriar Tyriar added this to the August 2022 milestone Aug 3, 2022
@bwateratmsft
Copy link
Contributor Author

@bwateratmsft what is it displaying if not the task type?

It was showing the name of the previous task, instead of the new one.

Actual:
image

Expected:
image

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster confirmation-pending labels Aug 3, 2022
@jscissr
Copy link

jscissr commented Sep 8, 2022

I have the same problem. Here is a simple way to reproduce it:
Create a file .vscode/tasks.json with the following content in a new folder:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Task 1",
      "type": "shell",
      "command": "echo Hello 1",
      "problemMatcher": []
    },
    {
      "label": "Task 2",
      "type": "shell",
      "command": "echo Hello 2",
      "problemMatcher": []
    }
  ]
}

Then open the folder in vscode, and run task 1, then task 2. This is the output:

 *  Executing task: echo Hello 1 

Hello 1
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: echo Hello 1 

Hello 2
 *  Terminal will be reused by tasks, press any key to close it. 

It looks like this regression was caused by #154513 @Tyriar.

await new Promise<void>(r => this._writeInitialText(xterm, r));

this._shellLaunchConfig = shell; // Must be done before calling _createProcess()

_writeInitialText is called before the line this._shellLaunchConfig = shell;, so it uses the old initialText.

meganrogge added a commit that referenced this issue Sep 26, 2022
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 26, 2022
@bwateratmsft
Copy link
Contributor Author

Thanks @meganrogge! I verified this is fixed on the latest Insiders build.

@meganrogge meganrogge added the verified Verification succeeded label Sep 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
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 insiders-released Patch has been released in VS Code Insiders regression Something that used to work is now broken tasks Task system issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants