victor-torres / atom-hg

Mercurial support for Atom text editor. Works on Linux, Mac OS X and Windows.
https://atom.io/packages/atom-hg
MIT License
27 stars 5 forks source link

Async support for Atom 1.7 #10

Closed victor-torres closed 8 years ago

victor-torres commented 8 years ago

As mentioned in #9 and #3. Here it comes Atom asynchronous support.

As far as I have tested it, it's working well. The only thing I noticed is that tree-view file diff/status won't work in repositories stored at /tmp haha, but it's not really a problem 😝

This will be released with version 2.0 (yes, we're jumping from version 1.0 because, hey, async support rocks 😎).

mrstebo commented 8 years ago

Only think I noticed that was missing was that you are not destroying @async in the HgRepository class. Also, from the GitRepository code in the atom repo, it seems like you have to call the async classes refreshStatus inside the the synchronous class? Not sure if that is required or not? I'll have a deeper look in to it tomorrow.

victor-torres commented 8 years ago

Hey. You said something I wasn't paying attention to. I'll make some tests tonight.

victor-torres commented 8 years ago

@mrstebo I don't know if we have to call @async methods from repositoryForDirectorySync.

If I open Atom's console and click between the code editor and the console window I can see a lag with Mercurial repositories that I can't see with git repositories.

Seems like tree-view is using the sync version of the repository provider, but if git-repository can do it without lag why can't we do it with atom-hg?

Unfortunately I may not have the required time to further investigate this. I hope you can take a clue on it tomorrow. Keep us up to date :+1:

mrstebo commented 8 years ago

They are using that node-git package for wrapping calls to git...Maybe there is something in that?

Just curious, what OS are you using? I'm doing the tests on Windows 10 64bit

victor-torres commented 8 years ago

OS X El Capitan