Re: Libification project (SoC)
- From
- Marco Costalba <mcostalba@gmail.com>
- Date
- Mar 19, 2007, 13:04 UTC
- Message-ID
- <e5bfff550703190604n6360659cl3880ec5b3a9b5042@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.63.0703191329220.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On 3/19/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 20 quoted lines
> Hi, > > On Mon, 19 Mar 2007, Marco Costalba wrote: > > > On 3/19/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > > > > > > I don't see _any_ problem in making an API which works with _one_ repo > > > first. This has several advantages: > > > > > > - most users (if any!) will work that way, > > > > > > > Sometime could be useful to write a list of possible users before > > starting to code. > > Fair enough. > > I expect the most visible users of libgit to be: the core Git programs! > Because if we don't eat our own dog food, why should anybody else? >
But in case you eat your own food, why others should to the same?
> And I am absolutely utterly opposed to make them slower just to support a > program which wants to cache meta data from multiple repositories. >
The problem, at least with viewers I know, it's not with multiple repositories but with multiple views of the same repo.
Anyway. Just to give my two cent:
The two possible features we are talking about are:
- reentrancy (many views open on the same repo)
- non-blocking behaviour (loading repo in background)
These two features are _very_ different. I agree an async library it's not a small thing, and probably it involves using an external thread library in libgit itself, like pthread, just to not reinventing the (difficult) wheel.
Regarding reentrancy I don't know what is involved in avoiding globals and the like, but I would think it's really an absolute minimum to get people eating your food ;-)
I completely agree that it's impossible to know how a library will be used when you write it, but giving a good look around before to start allows you to get a minimum subset of needed features and if you add a little bit of generalization and you are lucky enough perhaps you will avoid to rewrite the library in the future.
>From the viewers survey and also from the interesting examples of
Steve I would say that do not planning for reentarncy would be a big no-no
Marco