JunoLab / atom-ink

IDE toolkit for Atom
MIT License
228 stars 40 forks source link

deserialization of PaneItem broken #71

Closed pfitzseb closed 8 years ago

pfitzseb commented 8 years ago

or rather not registered early enough. I get a warning whenever I restart Atom with some custom PaneItem open:

No deserializer found for Object {deserializer: "InkWorkspace", id: "julia"}

I suppose this is because Atom tries to deserialize the cached editor before loading the packages, since the deserializer we want appears in atom.deserializers.deserializers on package activation.

MikeInnes commented 8 years ago

This is happening because you broke Ink at some point :) Atom determines whether it can load a package before or after deserialisation; for some reason deferring gets set by package load failure and won't unset itself. But you can fix that by running:

p = atom.packages.getActivePackage('ink')
localStorage.setItem(p.getCanDeferMainModuleRequireStorageKey(), false)

from the console.

(This is the snippet that we ran on activation at one point, but removed since it seemed to cause issues with remembering window size.)

pfitzseb commented 8 years ago

Sweet, thanks (breaking ink happens quite often to me ;)).

Do you remember if we tried to defer running that command until after activation is complete or something like that? Or run it on deactivation?

MikeInnes commented 8 years ago

I think we only ever tried running it on activate – might be worth checking the history for that though. Waiting for Atom to finish activating or something might well give you more luck though.

pfitzseb commented 8 years ago

Just checked -- we didn't try anything else.

Clearing that setting on deactivation seems to work though. I'll push that change for now and we'll see if anything breaks again...