macros icon indicating copy to clipboard operation
macros copied to clipboard

Fix return Promises so each step runs in sequence

Open xoob opened this issue 7 years ago • 11 comments

Return the Promise of each executeCommand() call to PromiseSeries, so that commands are executed in sequence, not in parallel.

xoob avatar May 03 '17 08:05 xoob

+1

josenicomaia avatar Jul 31 '17 08:07 josenicomaia

please merge this. this extension is pretty much broken without this.

Spongman avatar Aug 08 '17 21:08 Spongman

@Spongman Indeed

josenicomaia avatar Aug 09 '17 11:08 josenicomaia

also, the 'custom delay' patch is unnecessary with this patch.

Spongman avatar Aug 09 '17 18:08 Spongman

why is it not in...?

mizagog avatar Sep 04 '17 13:09 mizagog

Is this extension abandoned? This fix is pretty core, why no merge?

therealpeterhua avatar Dec 26 '18 03:12 therealpeterhua

This worked well for me and is easy to understand. Simply add return to the beginning of lines 34 and 38.

Current: https://github.com/geddski/macros/blob/96b0d7b2930c26eea22f2a9acbebba823bc98c5b/extension.js#L34

https://github.com/geddski/macros/blob/96b0d7b2930c26eea22f2a9acbebba823bc98c5b/extension.js#L38

Fixed: https://github.com/geddski/macros/blob/de2633df8bb5ab0042fe0f0ebe15e40da1fe16fa/extension.js#L34 https://github.com/geddski/macros/blob/de2633df8bb5ab0042fe0f0ebe15e40da1fe16fa/extension.js#L38

clayms avatar Jan 02 '19 22:01 clayms

Since it's been three years with no merge I found this fork that fixes this: https://github.com/ctf0/macros

jpotterm avatar Apr 02 '20 15:04 jpotterm

@geddski how is it about this Pull Request? Can we may work on this this weekend and merge and release a version 1.3?

tobiashochguertel avatar Apr 22 '22 16:04 tobiashochguertel

This worked well for me and is easy to understand. Simply add return to the beginning of lines 34 and 38.

Current:

https://github.com/geddski/macros/blob/96b0d7b2930c26eea22f2a9acbebba823bc98c5b/extension.js#L34

https://github.com/geddski/macros/blob/96b0d7b2930c26eea22f2a9acbebba823bc98c5b/extension.js#L38

Fixed:

https://github.com/geddski/macros/blob/de2633df8bb5ab0042fe0f0ebe15e40da1fe16fa/extension.js#L34

https://github.com/geddski/macros/blob/de2633df8bb5ab0042fe0f0ebe15e40da1fe16fa/extension.js#L38

I also am affected by the issue. See https://stackoverflow.com/questions/72153504/prevent-asynchronous-order-of-command-sequence-execution-in-vs-codium

I added these two return in the ~/.vscode/extensions/geddski.macros-1.2.1/extension.js, but it did not work for me. It still always execute commands in parallel. Any advise?

Ashark avatar May 10 '22 17:05 Ashark

Since it's been three years with no merge I found this fork that fixes this: https://github.com/ctf0/macros

@jpotterm How to install that? It seems it has not been published in marketplace?

Ashark avatar May 10 '22 17:05 Ashark