You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See #44018 for the discussion and the consequences.
To reproduce:
install tsc 2.7.2
create new folder
change to folder
tsc --init
open VS Code
create a HelloWorlds.ts
Run Task > pick the watch task
have auto save one
change the HelloWorld.ts a couple of times. At some point the Building... in the status line doesn't disappear anymore.
The underlying reason is that the terminal sends lines twice confusing the tracking of the task output.
As you can see in the above screen shot the FIle change detected line at 11:13:12 is send twice resulting in the task to assume that two builds have started but only one compilation complete is send hence the building is kept.
Daniel Imms (@Tyriar) can you please have a look. This results in a regression with the tasks when using tsc 2.7.x which introduced clearing the terminal when a new compile run triggered through a file change starts.
Daniel Imms (@Tyriar) can you please comment. IMO we need to address at least the original bug (even if we introduce some work arounds) for this milestone. It is a bad user experience.
I'm not really understanding why the problem matcher system doesn't handle this as the events are still being fired in order, just sometimes they can be duplicated?
When the problem case happens, tryBegin and tryFinish are being called correctly, just tryBegin is being triggered twice. I would expect the second tryBegin to either be ignored or reset the current run.
Looking into it deeper, I'm assuming this is to allow problems to be matched on things like gulp tasks which can have multiple different tasks in a single run of a process.
Actually this is more complicated. It is not that the two identical lines come right after each other. There can be any blank lines in between as well and I am actually concerned that if the output contains errors they might interleave with the begin end as well. So deduping them might get more complicated on the matcher side.
Activity
dbaeumer commentedon Feb 22, 2018
Daniel Imms (@Tyriar) can you please have a look. This results in a regression with the tasks when using tsc 2.7.x which introduced clearing the terminal when a new compile run triggered through a file change starts.
dbaeumer commentedon Feb 22, 2018
I tried to debug this but when debugging it doesn't reproduce. I was only able to track this down by adding console.log statements here https://github.com/Microsoft/vscode/blob/master/src\vs\workbench\parts\tasks\electron-browser\terminalTaskSystem.ts#L263
dbaeumer commentedon Feb 26, 2018
Daniel Imms (@Tyriar) can you please comment. IMO we need to address at least the original bug (even if we introduce some work arounds) for this milestone. It is a bad user experience.
Tyriar commentedon Feb 28, 2018
I'm not really understanding why the problem matcher system doesn't handle this as the events are still being fired in order, just sometimes they can be duplicated?
When the problem case happens,
tryBeginandtryFinishare being called correctly, justtryBeginis being triggered twice. I would expect the second tryBegin to either be ignored or reset the current run.Tyriar commentedon Feb 28, 2018
Looking into it deeper, I'm assuming this is to allow problems to be matched on things like gulp tasks which can have multiple different tasks in a single run of a process.
Prevent the same problem matcher beginning twice
dbaeumer commentedon Mar 1, 2018
Daniel Imms (@Tyriar) I added a workaround on the task side.
I am still not understanding why the terminal sends the line twice and I sill think that might be a bug. So to clarify:
Other listeners might be affected by this as well.
dbaeumer commentedon Mar 1, 2018
Actually this is more complicated. It is not that the two identical lines come right after each other. There can be any blank lines in between as well and I am actually concerned that if the output contains errors they might interleave with the begin end as well. So deduping them might get more complicated on the matcher side.
dbaeumer commentedon Mar 1, 2018
I releases a work around in the problem collector however that meant to capture quite some state.
dbaeumer commentedon Mar 2, 2018
Closing. Dups #44018