Deprecation of Async Git in Atom 1.10


#1

Hi,

this is mainly an extract out of my comment on Github but I’d like to move the conversation to here. Via the issue #12159 the complete previously introduced async Git API has been replaced against the formerly deprecated sync Git API (which has happened in the Atom 1.7 release). Does this mean that the new async Git API will be removed for the time being and it’s unclear if it will be shipped again in Atom 1.10?

This causes quite some troubles for me as I’ve already completely migrated the tree-view-git-status package onto the new async API as the old sync API didn’t work any longer. It was really a big effort to migrate to the async API and now I’ve to undo everything again? … just wondering why such breaking changes are not causing a major version bump of Atom …

It would be great if you could give me some advice if there will be in the Atom 1.10 release an async Git wrapper for the sync Git or if async Git will be part of the release again.

Wondering if I’m the only one facing this issue as a package author.


#2

Thanks for posting it here.

I never used GitRepositoryAsync but I do use the built-in nodegit in a package I’m developing and this change would be a big problem. I can’t even migrate to the sync API because I need functions that git-utils does not provide.

nodegit is a large native module and package authors have already reported problems when building it as a package dependency.

Even if atom core packages don’t use it, maybe we could keep nodegit as a dependency in atom?


#3

The big problem right now is that Nodegit is causing Atom to be unstable and crash in certain circumstances that we aren’t able to reproduce. While the problems with Nodegit could theoretically be fixed, the fact that we can’t even reproduce the crashes consistently does not leave us with a feeling of confidence about delivering a stable Atom, which is our #1 priority.

It should be possible to bundle Nodegit as a dependency, and an upcoming long overdue upgrade to apm which was blocked on build infrastructure problems should ensure that the latest version can be bundled. We’re shooting to have this version of apm be part of the next beta release, which is when support for GitRepositoryAsync would be removed from stable. That would at least make it possible to embed the library on beta.

I hate to do this kind of thing, but it’s not always possible to predict these kinds of problems when choosing a direction for Atom core. We kept the APIs private for exactly this reason, but I realize that’s not much consolation.


#4

Thanks a lot for your explanation. It’s understandable to the stability of Atom has priority so I’ll try get a wrapper ready for my package that it can stay asynchronous. But thanks for the clarification that async Git will be removed again. Calling all this Git commands in a sync fashion didn’t feel really right in the first place so the recent changes had also a good side as it that forced me to make my package work async.

Mhhh I’ve always believed that I’m using a public API of Atom as it’s also documented here, GitRepository. Or do you mean that the async part of GitRepository was private? But I had not so much of choice than using it as the sync API was completely broken since 1.7 (at least for me…) hence I started to refactor my package onto the async one.

Anyhow for now I’ve no other choice than writing a wrapper for the sync Git API to support Atom version >= 1.10 and also Atom >= 1.7 which are shipping still with the async API.


#5

I believe GitRepository is the sync version, while GitRepositoryAsync is the async version (and if you notice, isn’t listed in the API docs due to a parsing limitation rather than the methods being private :P).