hax / refactor

Refactoring support in Atom.
https://atom.io/packages/refactor
MIT License
36 stars 8 forks source link

Avoid throwing an error when deactivating package #28

Closed Alhadis closed 7 years ago

Alhadis commented 7 years ago

While investigating an issue with icon loading, I noticed this flash in my console very briefly when reloading the window:

Figure 1

I can't confirm if this is what's causing the sporadic failures reported in #16, but I do know that Atom loads packages synchronously... which means it's subject to race conditions. So if an error occurred while deactivating every package whilst updating, it could interfere with the reactivation of every other package.

That's my theory at least. Even if it doesn't solve this stupid issue, you should at least know you're using a property that was deprecated over two years ago.

Alhadis commented 7 years ago

@hax Please use specs. Seriously. They would've alerted you long ago that you were using a deprecated property (which has now been removed from Atom's API, hence this breakage).

hax commented 7 years ago

@Alhadis These are old code from original author, and in fact I already fix them in other commit which not merge to master yet. But I didn't know it can fix resource loading problem. Thank you.