Hello,

I wanted to share some updates.

On 2/17/2016 6:38 AM, RjOllos wrote:
> 
> Hi Christian,
> 
> The results look very encouraging. I like the move to a more popular
> templating library, which I hope will help at least a little in
> attracting new contributors.

I also hope that getting back in touch with decent performance will
bring renewed interest.

> 
> Once I finish up a few more tasks I plan to spend some time studying
> your code, and will try converting a template or two. If I can manage
> that, then the tasks should be more than doable for everyone else
> involved ;)

As you've probably seen, the Jinja2 related documentation improved lately:

 - https://trac.edgewall.org/wiki/TracDev/Proposals/Jinja features a
presentation of the page architecture, as well as some detailed
conversion examples
 - https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja is a
migration guide, targeted at plugin developers but it will also help us
for the core Trac templates

Speaking about the work in progress:
 - I'm roughly half-way through the list of templates, and I'll continue
in that order: wiki, revisionlog, roadmap, milestone, reports and admin
templates; the admin templates can follow the same model as the prefs
templates (well, I did migrate one admin panel already, so there's a
pattern to follow); if you want to help, start somewhere near the end of
that list ;-)
 - we will also need to port the templates in the t.e.o plugins, mostly
the SpamFilter plugin
 - fixing the tests is also a big task
 - we need to integrate Genshi's HTMLSanitizer and redo it without "streams"
 - and finally, we'll be able to remove the last remnants of Genshi

I've given some thoughts about maintaining a Genshi-compatibility layer,
but finally decided against it:
 - making the tag builder replacement API compatible with Genshi would
imply to reimplement it fully, instead of simplifying it
 - keeping the base Genshi infrastructure would hinder the evolution of
the layout/theme templates, and chrome component, as everything would
have to be done twice there
 - there wouldn't anyway be a sensible way to support plugins relying on
the ITemplateStreamFilter for modifying other pages, if those pages are
produced by Jinja2 templates (parsing them back into a stream and
filtering them again would be a performance killer)

The goal is really to simplify the Trac code base, and getting rid of
the Genshi dependency will help us doing that. See for example the huge
simplification that happened with the mimeview/pygments renderer (1) (if
there was anyone feeling easy with having complex things like
_group_lines in our code base, well, that wasn't me ;-) ).


So overall I think we're a little more than half-way through, and if I
can maintain the current velocity, it sounds possible to make the switch
on trunk soon after the 1.2 release. That will give a clear signal to
the plugin developers, as well as giving them enough time to adapt
before 1.4. I should also evaluate how my branch plays with Jun's py3k
compat branch.


> I gather from your comment in #11988 that adopting a better functional
> testing framework might happen concurrently. It seems like a good idea
> to put some regression tests in place as we port the templates.

Fixing all the current tests is already a challenge, as lots of the
generated content is slightly different (tag builder API, `escape`d
strings, template generated content). But yes, ideally I'd like to give
a go to Selenium. I'm especially interested in finding a way to make the
functional tests run faster (create an env once, play the tests, remove
the env).

-- Christian

(1) -
https://trac.edgewall.org/changeset/6df5e586b8c5a7eaa1426a685913d116758bb28a/cboos.git/

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-dev+unsubscr...@googlegroups.com.
To post to this group, send email to trac-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to