git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: The future of gitweb (long term goals)

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 22, 2011, 18:17 UTC
Message-ID
<201102221917.57247.jnareb@gmail.com>
In-Reply-To
<AANLkTin9dWXkaxqLdiosx-=jA9gbEqoJ8aAFoZMU94ih@mail.gmail.com>
On Tue, 22 Feb 2011, Ævar Arnfjörð Bjarmason wrote:
> On Mon, Feb 14, 2011 at 20:39, Jakub Narebski <jnareb@gmail.com> wrote:
Show 23 quoted lines
> > This means that we are not able to use web (micro)framework, or use
> > templating engine to create HTML instead of combination of CGI.pm
> > methods and handcrafted HTML (worrying about proper escaping), or just
> > use CGI::Cache or Plack::Middleware::Cache for adding output caching
> > to gitweb.  Though if one wants web interface in Perl that uses web
> > framework (and is supposedly backwards-compatible with gitweb URLs),
> > there is always Gitalist which uses Catalyst web framework.
> >
> > On the other hand requiring non-core Perl modules means that gitweb
> > installation would be harder.  We can work around this issue if there
> > are a few small such modules (e.g. using Exception::Class or
> > HTTP::Exception as base class for gitweb error handling) by putting
> > them in 'inc/' and installing local version if they are not present,
> > like Git.pm does with local Error.pm module.  But for microframework,
> > or templating engine, or e.g. Plack (if we go the route to make gitweb
> > PSGI application) this would be rather out of question.  Anyway, in
> > any case gitweb would probably require more complicated build system
> > than current one... but moving to e.g. ExtUtils::MakeMaker shouldn't
> > be that hard (see how Git.pm does it, only we can require Perl 5.8.3
> > which has new enough EU::MM that supports DESTDIR).
> 
> Why do you think that if we use larger modules these things would get
> harder?

I mean here that while it makes sense to bundle some version of required modules in e.g. 'gitweb/inc/' (or 'perl/inc/') in gitweb sources if there are few small self-contained modules (like e.g. Try::Tiny, or Capture::Tiny), I don't think that bloating git repository with Perl dependencies would be a good idea.

Well, we could get them from CPAN during build if they are not present, and/or download them and include in generated tarball...

Show 8 quoted lines
> There's already applications on the CPAN which can do "fat
> packing". I.e. you could use Plack, Catalyst, Template and whatever
> else but run some make target to pack gitweb and all its dependencies
> into a single file.
> 
> Obviously it would be really big, and probably slow unless you ran it
> as a fastcgi script. But that would be a tradeoff for making the
> source easier to maintain.
Well, I know of two such modules: App::FatPack and PAR... neither of which
is in core.  But the issue is not with installing or bundling modules
when they are present, I think; we can always install modules alongside
gitweb in 'lib/' subdirectory, even if you don't have admin rights to
install those required modules system-wide.
 
And there is also local::lib, though the problem is that it is web server
user account that has to have path to Perl modules set up correctly.
> But packing things like these is not a technical challange at all, and
> probably way easier than reinventing the wheel each time you need some
> small thing that's not in core, but is in a popular & well tested CPAN
> module.

Well, there already exists Gitalist, which is Perl web interface to git repositories, which uses Catalyst MVC web framework (and which purposedly is backwards compatible with gitweb URLs, though I am not sure about path_info-based ones).

There is a question of balance (minimal dependencies or not reinventing the wheel) and choice (which of types of server to support: CGI, FastCGI, mod_perl, PSGI; what templating engine to use: Template Toolkit, Template::Xslate, Tenjin, Template::Declare / Markapl, Template::Semantic and HTML::Zoom, Template::Moustache; what framework or microframework to use: Mojolicus, Dancer, Web::Simple, Catalyst, Jifty, CGI::Application, Mason, etc.).

-- 
Jakub Narebski
Poland
Previous: Ævar Arnfjörð BjarmasonNext: Jakub Narebski
Message 7 of 30 in “The future of gitweb (long term goals)”
  1. Jakub NarebskiFeb 14, 2011
  2. Michael J GruberFeb 15, 2011
  3. Jakub NarebskiFeb 21, 2011
  4. Michael J GruberFeb 23, 2011
  5. The future of git-instaweb (was: Re: The future of gitweb (long term goals))Jakub Narebski, Feb 25, 2011
  6. Ævar Arnfjörð BjarmasonFeb 22, 2011
  7. Jakub NarebskiFeb 22, 2011
  8. The future of gitweb - part 2: JavaScriptJakub Narebski, Apr 14, 2011
  9. Michał ŁowickiApr 14, 2011
  10. david@lang.hmApr 15, 2011
  11. Peter VereshaginApr 16, 2011
  12. Jakub NarebskiApr 16, 2011
  13. Peter VereshaginApr 16, 2011
  14. Jakub NarebskiApr 16, 2011
  15. Peter VereshaginApr 16, 2011
  16. Jakub NarebskiApr 16, 2011
  17. Jakub NarebskiApr 16, 2011
  18. Peter VereshaginApr 16, 2011
  19. Jakub NarebskiApr 17, 2011
  20. Gitweb != HTTP back-end {Was: Re: The future of gitweb - part 2: JavaScript}Drew Northup, Apr 20, 2011
  21. Jakub NarebskiApr 20, 2011
  22. Pau Garcia i QuilesApr 16, 2011
  23. Jakub NarebskiApr 17, 2011
  24. Pau Garcia i QuilesApr 17, 2011
  25. Jakub NarebskiApr 18, 2011
  26. Petr BaudisApr 17, 2011
  27. Jakub NarebskiApr 18, 2011
  28. Petr BaudisApr 18, 2011
  29. Jakub NarebskiApr 18, 2011
  30. Drew NorthupApr 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.