All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Jon Seymour <jon.seymour@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: RFC: a plugin architecture for git extensions?
Date: Wed, 27 Apr 2011 16:52:00 +0200	[thread overview]
Message-ID: <4DB82D90.6060200@op5.se> (raw)
In-Reply-To: <BANLkTimUHrHqS-Ssj+mK=0T8QHKg34pkaw@mail.gmail.com>

On 04/27/2011 02:50 PM, Jon Seymour wrote:
> On Wednesday, April 27, 2011, Andreas Ericsson  wrote:
>> On 04/27/2011 05:36 AM, Jon Seymour wrote:
>>> Has anyone ever given consideration to git supporting a plugin
>>> architecture for git extensions?
>>>
>>> The idea would be to provide a consistent way to install, and address
>>> extensions to the core git functionality in a manner that does not
>>> require the extension to actually be integrated into the git core.
>>>
>>
> 
>> Horrible idea. There are already as many package managers as there
>> are packages without us throwing another one into the mix.
>>
> 
> I agree that there are too many package managers. But do you know
> what? There isn't a single package manager that reliably works across
> platform. apt-get? great. Except you need something else for Mac,
> cywgin, or, um Fedora. Brew? Fine then you only need to worry about
> Linux and cygwin. Cygwin? ...
> 
> The platform for my extension is git. Not Mac. Not Debian. Not Fedora.
> Not cygwin. git.
> 
> The lowest common denominator across these environments is, um, git.
> 

You're utterly horribly wrong. It'll work well enough for scripted
languages but when you start mixing in compiler requirements and
whatnot the scheme falls apart. Quickly. Binary packages are popular
for (very good) reasons: They are simple, fast and there's a
reasonable chance they've been tested fairly well with the rest of
the system so nothing breaks horribly once you install it.

Perl, Ruby, Python and PHP all have their own extension installers.
That makes perfect sense since the same code runs unchanged on all
platforms (with some few exceptions).

> I challenge the sceptIcs to specify a one line command script that
> works across all possible environment that is more succinct than:
> 
>     git pm install gitwork
> 

That's not the point. Mac users supposedly already know about brew.
Fedora users already know about yum. Cygwin users... well, I have
no idea what they know about, but whatever it is, it's fairly safe
to assume they already know about it. That means they'll turn to
that familiar tool for managing packages when they want to install
something new. What you're proposing would force users on *all*
systems to have to learn a new one.

> It shouldn't be too hard. A tar command here, an enviroment  variable
> edit there. Perhaps a curl command or a browser download.
> 

And what you get in the end is a f*cking mess of spaghetti shell
code that works worse than the existing package managers.

And you're right. It's not too hard, so long as every extension
manager maintains some short list of requirements in the proper
format, which current package maintainers will have to learn if
they want some modules to be part of the "default" system install,
the way a whole bunch of Perl modules are.

> You have 4 words. Knock yourself out.
> 

make install

Made it in 2. What you described is what the user does to get
new extensions. What I described below is what developers have
to do to make their extensions easy to install *without* a
package manager even if the distro the user is on doesn't ship
that particular extension.

> 
>>> So, perhaps it won't be included in git. That's fine, I can build my
>>> own fork of git which includes the proposed extension [ indeed, this
>>> is how I originally developed it]. That's fine for
>>> me, but it isn't the most practical way to distribute it to others
>>> since I'll have to produce distribution packages for a variety of
>>> different distribution formats or fallback to tars and zips.
>>>
>>
>> What you can do is let your Makefile (or some other install-script)
>> take the destination path for "make install" (or equivalent) from
>> the output of "git --exec-path".
>>
>> That way, you can ship "git extadd" or whatever you want to call it
>> as a simple installer that installs executable and man-page in their
>> proper locations. If the commands you install require configuration
>> by default I'd say they're broken to begin with, but even that can
>> be remedied by running "git config --add key value" from the installer.
>>
>> So in a way, git is already its own pkg-config binary and anyone
>> clever enough to write useful scripts that enhances git will almost
>> certainly see that and use it from their favourite language quite
>> without having to learn some new magic format for package management.
>>
> 
> Those 3 paragraphs were substantially longer than 4 words. Again,
> there is a tar ball, let me know how I can install it across alll
> environments that got runs on. Make sure the man pages work.
> 

So the complete description would be

  git clone git://somerepo/gitworks
  cd gitworks
  make install

and the rest is in developer hands. If you make the extension
manager run *ONLY* those commands, you've made it fairly simple for
extension developers and users both, but then the gain is so
extremely small that it's hardly worth it anymore, although I agree
it would be nifty to keep a list of popular extensions on a wiki
somewhere so users can actually find them.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

  parent reply	other threads:[~2011-04-27 14:52 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27  3:36 RFC: a plugin architecture for git extensions? Jon Seymour
2011-04-27  3:58 ` Jonathan Nieder
2011-04-27  5:06   ` Jon Seymour
2011-04-27  5:07 ` Junio C Hamano
2011-04-27  5:10   ` Jon Seymour
2011-04-27  5:17     ` Junio C Hamano
2011-04-27  5:33       ` Jon Seymour
2011-04-27  5:37         ` Jon Seymour
2011-04-27  5:39         ` Junio C Hamano
2011-04-27  5:42           ` Jon Seymour
2011-04-27  7:15           ` Jon Seymour
2011-04-27  7:57             ` Michael J Gruber
2011-04-27  8:15               ` Jon Seymour
2011-04-27  8:40                 ` Jon Seymour
2011-04-27  9:36                   ` Motiejus Jakštys
2011-04-27  9:59                     ` Jon Seymour
2011-04-27 10:48                       ` Motiejus Jakštys
2011-04-27 10:21             ` Carlos Martín Nieto
2011-04-27 10:44               ` Jon Seymour
2011-04-27 11:38         ` Fredrik Gustafsson
2011-04-27 11:57           ` Jon Seymour
2011-04-27 22:32         ` Pau Garcia i Quiles
2011-04-27 22:47           ` Jon Seymour
2011-04-27 11:01 ` Ævar Arnfjörð Bjarmason
2011-04-27 11:42   ` Jon Seymour
2011-05-13 19:32     ` Enrico Weigelt
2011-04-27 12:08 ` Andreas Ericsson
2011-04-27 12:50   ` Jon Seymour
2011-04-27 13:07     ` Felipe Contreras
2011-04-27 13:59       ` Jon Seymour
2011-04-27 14:52     ` Andreas Ericsson [this message]
2011-04-27 15:36       ` Jon Seymour
2011-04-27 16:13         ` Jon Seymour
2011-04-27 17:07           ` A Large Angry SCM
2011-04-28  3:07             ` Jon Seymour
2011-04-28  3:26               ` Jon Seymour
2011-04-28  5:04                 ` Jon Seymour
2011-04-28  6:15                   ` Jon Seymour
2011-04-28 16:16               ` david
2011-04-29  3:35                 ` Jon Seymour
2011-04-27 19:16           ` Motiejus Jakštys
2011-04-27 19:19             ` Motiejus Jakštys
2011-04-27 17:34       ` Junio C Hamano
2011-04-27 18:28         ` Junio C Hamano
2011-04-27 18:49           ` Drew Northup
2011-04-27 19:42             ` Joey Hess
2011-04-27 20:16               ` Drew Northup
2011-04-27 21:38               ` Junio C Hamano
2011-04-27 22:08                 ` Jonathan Nieder
2011-04-27 22:32                   ` Jon Seymour
2011-04-28  9:07                     ` Andreas Ericsson
2011-04-27 23:27                   ` Junio C Hamano
2011-04-27 23:42                     ` Jonathan Nieder
2011-04-28  0:10                       ` Junio C Hamano
2011-04-28  0:50                         ` Jon Seymour
2011-04-28  0:54                           ` Jon Seymour
2011-04-28  0:55                           ` david
2011-04-28  2:08                             ` Jon Seymour
2011-04-28  2:15                               ` Jon Seymour
2011-04-28  2:49                                 ` Jon Seymour
2011-04-28  9:25                                   ` Andreas Ericsson
2011-04-28 10:56                                     ` Jon Seymour
2011-04-28 11:11                                       ` Jonathan Nieder
2011-04-28 11:20                                         ` Jon Seymour
2011-05-05 21:41                                       ` David Aguilar
2011-05-05 21:53                                         ` Junio C Hamano
2011-05-05 23:51                                           ` Jon Seymour
2011-05-06  4:47                                             ` Junio C Hamano
2011-05-06  6:20                                               ` Jon Seymour
2011-05-06  6:56                                                 ` Jonathan Nieder
2011-05-06  7:03                                                   ` Jonathan Nieder
2011-05-06 14:07                                                   ` Jon Seymour
2011-05-06 14:17                                                     ` Jonathan Nieder
2011-05-06 14:29                                                       ` Jon Seymour
2011-05-06 14:50                                                         ` Jonathan Nieder
2011-05-08  4:28                                                           ` Jon Seymour
2011-05-08  6:49                                                             ` Jonathan Nieder
2011-05-08  7:42                                                               ` Jon Seymour
2011-05-06 17:23                                                     ` Jeff King
2011-05-07  8:24                                                       ` John Szakmeister
2011-05-08  4:44                                                       ` Jon Seymour
2011-05-09  7:35                                                         ` Jeff King
2011-05-09  7:49                                                           ` Jon Seymour
2011-05-09  8:12                                                             ` Jeff King
2011-05-09  8:45                                                               ` Jon Seymour
2011-05-09 10:44                                                                 ` Jeff King
2011-05-09 11:07                                                                   ` Jon Seymour
2011-05-09 11:13                                                                     ` Jon Seymour
2011-05-09 11:24                                                                     ` Jeff King
2011-05-09 11:28                                                                       ` Jon Seymour
2011-05-09 12:21                                                                         ` Jeff King
2011-05-09 22:50                                                                           ` Jon Seymour
2011-05-08 13:13                                                   ` Jon Seymour
2011-05-09  4:36                                           ` Miles Bader
2011-05-14 12:51                                             ` David Aguilar
2011-04-28  9:11                                 ` Andreas Ericsson
2011-04-28 10:38                                   ` Jon Seymour
2011-04-28  7:40                               ` Pau Garcia i Quiles
2011-04-28  8:09                                 ` Jon Seymour
2011-04-28  9:11                                   ` Pau Garcia i Quiles
2011-04-28  9:42                                     ` Jon Seymour
2011-04-28  0:06                     ` Jon Seymour
2011-04-28  0:08                       ` Jon Seymour
2011-04-27 21:29 ` Motiejus Jakštys
2011-04-27 21:47   ` Jon Seymour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DB82D90.6060200@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=jon.seymour@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.