[xwiki-devs] [Proposal] Using Less4j by default in XWiki
Hi developers. I have recently implemented the ability to use LESS in SSX: http://jira.xwiki.org/browse/XWIKI-10708. This feature has pointed me out some bugs, that are reported upstream: https://github.com/less/less.js/issues/1878 https://github.com/less/less.js/issues/1968 I have tried to implement a workaround, but as a result, it is preventing us to use an important feature of LESS: .extend(). And it simply breaks the Caty work on the Menu Application. Moreover, LESS has been rewritten in version 2. But because of this refactoring, the Rhino version does not work. See: https://github.com/less/less.js/issues/2316 So we are stuck with the current version of LESS, with the bugs listed above (that I am not able to patch). But in parallel, I have worked to use LESS4j instead of the official LESS project (http://jira.xwiki.org/browse/XWIKI-11034). And today, I finally managed to make it work! The good news is that LESS4j does not have the bugs that are blocking us. I propose to commit this for 6.4M2 (before tomorrow), and we can still revert it afterwards. Advantages of LESS4j: * should be quicker (see: https://github.com/xwiki-contrib/less-vs-sass-benchmark) * does not have the bugs listed above * we can hope that the version 2 will be ported to LESS4j too. Drawbacks of LESS4j: * maintained by only one developer (but reactive when I report bugs) * not exactly the same behaviour than LESS: https://github.com/SomMeri/less4j/wiki/Differences-Between-Less.js-and-Less4... * maybe the error messages are less kindly than lessjs ones. My implementation is configurable: an administrator can decide to use the LESS official version by changing a property in xwiki.properties. I just propose to have LESS4j by default. Here is my +1. Thanks, -- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project
Since it will be easy to switch back to other implementations. Here is my +1 too. On Wed, Dec 17, 2014 at 05:04:19PM +0100, Guillaume "Louis-Marie" Delhumeau wrote:
Hi developers.
I have recently implemented the ability to use LESS in SSX: http://jira.xwiki.org/browse/XWIKI-10708.
This feature has pointed me out some bugs, that are reported upstream: https://github.com/less/less.js/issues/1878 https://github.com/less/less.js/issues/1968
I have tried to implement a workaround, but as a result, it is preventing us to use an important feature of LESS: .extend(). And it simply breaks the Caty work on the Menu Application.
Moreover, LESS has been rewritten in version 2. But because of this refactoring, the Rhino version does not work. See: https://github.com/less/less.js/issues/2316
So we are stuck with the current version of LESS, with the bugs listed above (that I am not able to patch).
But in parallel, I have worked to use LESS4j instead of the official LESS project (http://jira.xwiki.org/browse/XWIKI-11034). And today, I finally managed to make it work!
The good news is that LESS4j does not have the bugs that are blocking us.
I propose to commit this for 6.4M2 (before tomorrow), and we can still revert it afterwards.
Advantages of LESS4j: * should be quicker (see: https://github.com/xwiki-contrib/less-vs-sass-benchmark) * does not have the bugs listed above * we can hope that the version 2 will be ported to LESS4j too.
Drawbacks of LESS4j: * maintained by only one developer (but reactive when I report bugs) * not exactly the same behaviour than LESS: https://github.com/SomMeri/less4j/wiki/Differences-Between-Less.js-and-Less4... * maybe the error messages are less kindly than lessjs ones.
My implementation is configurable: an administrator can decide to use the LESS official version by changing a property in xwiki.properties. I just propose to have LESS4j by default.
Here is my +1.
Thanks, -- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
On Wed, Dec 17, 2014 at 5:04 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Hi developers.
I have recently implemented the ability to use LESS in SSX: http://jira.xwiki.org/browse/XWIKI-10708.
This feature has pointed me out some bugs, that are reported upstream: https://github.com/less/less.js/issues/1878 https://github.com/less/less.js/issues/1968
I have tried to implement a workaround, but as a result, it is preventing us to use an important feature of LESS: .extend(). And it simply breaks the Caty work on the Menu Application.
Moreover, LESS has been rewritten in version 2. But because of this refactoring, the Rhino version does not work. See: https://github.com/less/less.js/issues/2316
So we are stuck with the current version of LESS, with the bugs listed above (that I am not able to patch).
But in parallel, I have worked to use LESS4j instead of the official LESS project (http://jira.xwiki.org/browse/XWIKI-11034). And today, I finally managed to make it work!
The good news is that LESS4j does not have the bugs that are blocking us.
I propose to commit this for 6.4M2 (before tomorrow), and we can still revert it afterwards.
Advantages of LESS4j: * should be quicker (see: https://github.com/xwiki-contrib/less-vs-sass-benchmark) * does not have the bugs listed above * we can hope that the version 2 will be ported to LESS4j too.
Drawbacks of LESS4j: * maintained by only one developer (but reactive when I report bugs) * not exactly the same behaviour than LESS: https://github.com/SomMeri/less4j/wiki/Differences-Between-Less.js-and-Less4... * maybe the error messages are less kindly than lessjs ones.
My implementation is configurable: an administrator can decide to use the LESS official version by changing a property in xwiki.properties. I just propose to have LESS4j by default.
Here is my +1.
Thanks, -- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 -- Thomas Mortagne
Some news about that. After having done more tests (most of them with the new improvements on the Menu Application done by Caty http://jira.xwiki.org/browse/XWIKI-11408), I have reached 2 bugs on less4j: - https://github.com/SomMeri/less4j/issues/246 - https://github.com/SomMeri/less4j/issues/247 The second bugs breaks XWIKI-11408. On the other hand, the current implementation, with the official lessjs compiler, breaks XWIKI-11408 too. Fortunately, Caty managed to re-write XWIKI-11408 with the limitation that I have introduced previously (not using .extend()) with lessjs. The result is not as good as her previous shot but this is the best we can do now. So I update my proposal and I now propose to put less4j by default as soon as they fix the blocking issue, so that we can put back the first version of the Caty's work and enjoy it. Sorry for all these changes, I really wanted to commit something good before M2, but since we are probably going to have a M3, we will have some air to tests things serenely. Thanks, Guillaume 2014-12-18 10:50 GMT+01:00 Thomas Mortagne <[email protected]>:
On Wed, Dec 17, 2014 at 5:04 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Hi developers.
I have recently implemented the ability to use LESS in SSX: http://jira.xwiki.org/browse/XWIKI-10708.
This feature has pointed me out some bugs, that are reported upstream: https://github.com/less/less.js/issues/1878 https://github.com/less/less.js/issues/1968
I have tried to implement a workaround, but as a result, it is preventing us to use an important feature of LESS: .extend(). And it simply breaks the Caty work on the Menu Application.
Moreover, LESS has been rewritten in version 2. But because of this refactoring, the Rhino version does not work. See: https://github.com/less/less.js/issues/2316
So we are stuck with the current version of LESS, with the bugs listed above (that I am not able to patch).
But in parallel, I have worked to use LESS4j instead of the official LESS project (http://jira.xwiki.org/browse/XWIKI-11034). And today, I finally managed to make it work!
The good news is that LESS4j does not have the bugs that are blocking us.
I propose to commit this for 6.4M2 (before tomorrow), and we can still revert it afterwards.
Advantages of LESS4j: * should be quicker (see: https://github.com/xwiki-contrib/less-vs-sass-benchmark) * does not have the bugs listed above * we can hope that the version 2 will be ported to LESS4j too.
Drawbacks of LESS4j: * maintained by only one developer (but reactive when I report bugs) * not exactly the same behaviour than LESS:
https://github.com/SomMeri/less4j/wiki/Differences-Between-Less.js-and-Less4...
* maybe the error messages are less kindly than lessjs ones.
My implementation is configurable: an administrator can decide to use the LESS official version by changing a property in xwiki.properties. I just propose to have LESS4j by default.
Here is my +1.
Thanks, -- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project
Some news. Less4j 1.9.0 has been released recently and fixes the blocker points we had before. At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j. But I have changed my mind since lessjs have a lot of limitations that less4j does not: - it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3]. On the other hand, using Less4j is really simple and faster. So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution. Here is my +1 Thanks, Guillaume [1]: https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat... [2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316
+1, I think we already discussed this some time ago but maybe it was only the two of us On Tue, Mar 3, 2015 at 4:17 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Some news.
Less4j 1.9.0 has been released recently and fixes the blocker points we had before.
At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j.
But I have changed my mind since lessjs have a lot of limitations that less4j does not:
- it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3].
On the other hand, using Less4j is really simple and faster.
So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution.
Here is my +1
Thanks, Guillaume
[1]: https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat... [2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+0 Thanks, Marius On Tue, Mar 3, 2015 at 5:17 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Some news.
Less4j 1.9.0 has been released recently and fixes the blocker points we had before.
At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j.
But I have changed my mind since lessjs have a lot of limitations that less4j does not:
- it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3].
On the other hand, using Less4j is really simple and faster.
So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution.
Here is my +1
Thanks, Guillaume
[1]: https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat... [2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+0 Thanks, Caty On Tue, Mar 3, 2015 at 5:59 PM, Marius Dumitru Florea < [email protected]> wrote:
+0
Thanks, Marius
On Tue, Mar 3, 2015 at 5:17 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Some news.
Less4j 1.9.0 has been released recently and fixes the blocker points we had before.
At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j.
But I have changed my mind since lessjs have a lot of limitations that less4j does not:
- it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3].
On the other hand, using Less4j is really simple and faster.
So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution.
Here is my +1
Thanks, Guillaume
[1]:
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat...
[2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 I trust you :) On Tue, Mar 3, 2015 at 5:13 PM, Ecaterina Moraru (Valica) <[email protected]
wrote:
+0
Thanks, Caty
On Tue, Mar 3, 2015 at 5:59 PM, Marius Dumitru Florea < [email protected]> wrote:
+0
Thanks, Marius
On Tue, Mar 3, 2015 at 5:17 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Some news.
Less4j 1.9.0 has been released recently and fixes the blocker points we had before.
At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j.
But I have changed my mind since lessjs have a lot of limitations that less4j does not:
- it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3].
On the other hand, using Less4j is really simple and faster.
So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution.
Here is my +1
Thanks, Guillaume
[1]:
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat...
[2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
On 3 Mar 2015 at 17:36:15, Denis Gervalle ([email protected](mailto:[email protected])) wrote:
+1 I trust you :)
Same here! -Vincent
On Tue, Mar 3, 2015 at 5:13 PM, Ecaterina Moraru (Valica) > > wrote:
+0
Thanks, Caty
On Tue, Mar 3, 2015 at 5:59 PM, Marius Dumitru Florea < [email protected]> wrote:
+0
Thanks, Marius
On Tue, Mar 3, 2015 at 5:17 PM, Guillaume "Louis-Marie" Delhumeau wrote:
Some news.
Less4j 1.9.0 has been released recently and fixes the blocker points we had before.
At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j.
But I have changed my mind since lessjs have a lot of limitations that less4j does not:
- it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3].
On the other hand, using Less4j is really simple and faster.
So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution.
Here is my +1
Thanks, Guillaume
[1]:
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat...
[2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+0. On 03/03/2015 10:59 AM, Marius Dumitru Florea wrote:
+0
Thanks, Marius
On Tue, Mar 3, 2015 at 5:17 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Some news.
Less4j 1.9.0 has been released recently and fixes the blocker points we had before.
At first, I wanted to add an option to be able to chose which version we want to use in XWiki: the official lessjs or the java port less4j.
But I have changed my mind since lessjs have a lot of limitations that less4j does not:
- it only handle files, so when I want to include a template (from a skin document for example), I have to create a temporary directory and to put a copy of this template there. It is not clean and complicated to maintain [1]. - it has some bugs that less4j does not [2]. - we are currently blocked to the version 1.7.x because recent versions of lessjs does not work with Rhino [3].
On the other hand, using Less4j is really simple and faster.
So I update the proposal and I propose now to only use Less4j and get rid of the lessjs/rhino solution.
Here is my +1
Thanks, Guillaume
[1]: https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-6.4.2/xwiki-plat... [2]: https://github.com/less/less.js/issues/1968 [3]: https://github.com/less/less.js/issues/2316
-- Sergiu Dumitriu http://purl.org/net/sergiu
participants (8)
-
Denis Gervalle -
Ecaterina Moraru (Valica) -
Guillaume "Louis-Marie" Delhumeau -
Jean SIMARD -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
vincent@massol.net