geddski / macros

macros support for VS Code
MIT License
166 stars 36 forks source link

Fix return Promises so each step runs in sequence #11

Open xoob opened 7 years ago

xoob commented 7 years ago

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

josenicomaia commented 7 years ago

+1

Spongman commented 7 years ago

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

josenicomaia commented 7 years ago

@Spongman Indeed

Spongman commented 7 years ago

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

mizagog commented 7 years ago

why is it not in...?

therealpeterhua commented 5 years ago

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

clayms commented 5 years ago

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

jpotterm commented 4 years ago

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

tobiashochguertel commented 2 years ago

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

Ashark commented 2 years ago

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 commented 2 years ago

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?