ioquatix / script-runner

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, and Python. You can add more.
http://atom.io/packages/script-runner
Other
62 stars 23 forks source link

Changes required due to TextBuffer.save becoming async in Atom 1.19 #75

Closed maxbrunsfeld closed 7 years ago

maxbrunsfeld commented 7 years ago

Hi! Thanks for maintaining the script-runner package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Please let me know if you have any questions. I would be happy to help!

huba commented 7 years ago

Thank you for the heads up.

ioquatix commented 7 years ago

This should be pretty easy to fix.

ioquatix commented 7 years ago

Okay this has been fixed here https://github.com/ioquatix/script-runner/commit/1023a694a4202c0e3eb920b6269a6f072a1d504f feel free to provide any feedback if I haven't done it right.