Talk:Requests for comment/Change LESS compilation library

Go for it!
Not a lot of additional technical insight, I am afraid, just a big vote in favor of this RfC. The currently used LESS parser is not able to parse Bootstrap 3 anymore. The oyejorge one is and so I use it for Extension:Bootstrap in latest versions. Works great. Also the developer's stated intention to basically mirror the JS version of the LESS parser makes a lot of sense to me. The only problem right now is that the new parser lib contains a lessc.php file to be used as a drop-in replacement for the old compiler which is problematic and leads to error messages when they are used in parallel. So, as far as I am concerned, the sooner we can get rid of the old parser, the happier I will be.

One more thing to take into consideration: The new parser is available as a Composer package. Don't know if we could/should make use of that.

--F.trott (talk) 23:34, 9 May 2014 (UTC)

Daniel Friesen (Dantman) (talk) 06:05, 10 May 2014 (UTC)
 * Be warned that most of the bugs stating that less.php is slow are actually specifically mentioning that less.php is slow at compiling Bootstrap, taking 5.1 seconds to compile Bootstrap and another 0.7 to compile the Font-Awesome copy it uses – in other words it's actually possible that less.php may be as fast as lessc in normal conditions, but really slow when excessively using advanced features that lessc can't even use – so don't get too happy about that, the performance of compiling Bootstrap may actually be an issue of adoption for you.
 * Note that if we switched to less.php we would not be using the compat layer. The compat layer doesn't support custom functions and for compatibility with lessc actually recreates lessc bugs like the broken include dir order that we explicitly do not want. So it's always a good idea to skip the compat layer if possible.
 * Technically composer isn't a big plus or minus, both lessc and less.php actually support composer. Though since less.php is a full tree while lessc is a single file it would make sense to actually use composer this time around.


 * Well, it would be nice if it was faster, but since less.php works while lessc does not, I'll not complain. And the styles are heavily cached anyway, so it's not that much of an issue. At least I did not get any complains yet.
 * I do not use the compat layer, in fact I would have been happy if it had not been there.

--F.trott (talk) 08:43, 10 May 2014 (UTC)

Makes sense to me as well.NEverett (WMF) (talk) 21:06, 16 June 2014 (UTC)

Either way we should use composer to manage the dependency
If we stick with the current library or switch to a new one, we should use MediaWiki's composer.json to declare the dependency and the mediawiki/vendor.git repo to import the library for use on the WMF cluster. --BDavis (WMF) (talk) 18:37, 19 November 2014 (UTC)