Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any plans to have a more verbose model and command API in dugite? #99

Closed
kittaakos opened this issue May 31, 2017 · 2 comments

Comments

@kittaakos
Copy link
Contributor

Hi there,

I found the dugite library very useful, lightweight and convenient. I've read a thread why it is better to use dugite instead of using nodegit.

In the desktop code base, you have already implemented a lot of git commands with the corresponding models, which is awesome.

Unfortunately, I was unable to figure out a way to use them in my code. I assume it is not published to npm yet or I must be blind. Also, in some places, I can see UI dependency in the model code which should not harm for instance a backend application (that we are working on) but it does not either make much sense. So our plan is to create an npm package that contains dugite (as an upstream npm dependency) and the stripped down version of the commands and models you guys have been working. And redistribute it under MIT license.

Could you guys give me some feedback whether

  • it should be possible to reuse desktop commands and models in a downstream npm package. (Please note, we cannot have a dependency on electron.)
  • you have already planned to decouple the commands and model from the UI and redistribute them without the electron application.

Thanks for your effort so far and in advance for your feedback!

@shiftkey
Copy link
Member

@kittaakos thanks for the feedback!

There's a couple of reasons we shied away from bundling more abstractions on top of this core:

  • the Desktop and Atom teams were focused on these releases, so we baked our own abstractions into our projects for the sake of convenience.
  • Git gives you the ability to pretty print for some commands, so you'll see things (like log for example) are tuned for just the information we want in the app.

There's probably some value in this, we just haven't had the time to think about it.

In response to your question:

  • it should be possible to reuse desktop commands and models in a downstream npm package. (Please note, we cannot have a dependency on electron.)
  • you have already planned to decouple the commands and model from the UI and redistribute them without the electron application.

We don't have plans to extract the stuff we've been building out into it's own package, or push it down into dugite itself. Maybe once things stabilize, if people are interested in reusing that stuff (it is in TypeScript, and not everyone is into that). But the Desktop team is focused on migrating people away from the existing applications, which requires feature work and bugfixes first.

I think I'm okay with this if you wanted to build upon dugite and provide those abstractions, but be aware that much of the stuff in Desktop is subject to change (I'm making big changes to status at the moment, for example) so I'm not sure we'd take a dependency on an abstraction anytime soon.

cc @BinaryMuse @kuychaco @smashwilson @desktop/core for feels

@kittaakos
Copy link
Contributor Author

Thank you for your feedback and clarification, @shiftkey.

I close this ticket now. Once we have the npm package with the commands and models built on the top of your work, I will share it here. Others might find it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants