From: Alex F. <al...@fi...> - 2011-11-24 18:40:48
|
Dear all, I have absolutely no idea whether or not there is anybody on this list, or if they are whether or not they are interested in things webmacro, so I might be talking to myself, but here goes... First off, I've found a bug. Lets consider the following block of code: #templet $test { Original: $value <br /> #set $value = $value + 1 Incremented: $value <br /> } #eval $test using { "value": 1 } You run this in a servlet and it does what you would expect, ie: Original: 1 Incremented: 2 However if you reload the page shortly afterwards then you get the slightly surprising: Original: 2 Incremented: 3 which is much less what you would expect. I've been doing some initial poking around and from what I can see the problem is roughly along the lines of: - the parser compiles the {"value": 1} into a Map and then caches this - the EvalDirective passes this very same Map into the Context that is used to evaluate the $test templet - the $test templet makes changes to it's Context which then changes the cached compiled version of {"value": 1} - the next time we invoke $test, we pass in what we assume is the compiled version of {"value": 1}, but it actually now contains {"value": 2} If one leaves a pause between reloads and the caching engine discards the cached parsed templates then the value returns back to 1. Now obviously, the EvalDirective should be taking a shallow copy of the params before setting this as the Map that is backing the Context that is used to evaluate $test. I've mocked this up in user space so that I can invoke: #eval $test using $Vars.copyMap({ "value": 1 }) and I get the expected behaviour, ie the value doesn't increment between reloads. So I'm going to patch EvalDirective to sort this out which brings me onto my second point. I've been doing a bit of playing around with webmacro myself and I've got a clone of the git repository that Guy Bolton-King took of the sourceforge CVS repository and this is sitting at https://github.com/alex-fiennes/webmacro This has been a gentle experiment so far because I haven't found anything that is actually broken yet, but come this bug then I suspect that I might well start using my branch for production stuff rather than just playing around with ideas. Who else other than me is still using webmacro and should I just continue to work on my github branch and move forwards? Failing that, do people want me to backport changes across to sourceforge? Stuff that I have been initially working on in github is: - removing the dependencies on the EDU.oswego.cs.dl.util.concurrent packages and using the java concurrent packages - adding in generics declarations as required so that the package will compile cleanly against modern java. What I am planning to work on is: - adding in support for invoking varargs methods from inside templates - a certain amount of refactoring to use more of google guava libraries as appropriate - better error reporting on nested templet invocations If people want to let me know whether or not any of this is of interest to anyone then we can work out how to move forwards. If I don't hear back from anyone then I will assume that everyone has moved on to new pastures and I will just continue down the path outlined above. Alex -- Alex Fiennes email: al...@fi... mobile: +44 (0)7813 832662 office: +44 (0)1875 823 310 |
From: Tim P. <ti...@pa...> - 2011-11-27 19:46:41
|
Hi Alex, Great to hear from you, not so great that you have found a bug ! [snip] > So I'm going to patch EvalDirective to sort this out which brings me onto my > second point. > I've been doing a bit of playing around with webmacro myself and I've got a > clone of the git repository that Guy Bolton-King took of the sourceforge CVS > repository and this is sitting at https://github.com/alex-fiennes/webmacro I do not understand why you are using a copy of someone else's copy of webmacro? You are a committer, so should be using the trunk. > This has been a gentle experiment so far because I haven't found anything > that is actually broken yet, but come this bug then I suspect that I might > well start using my branch for production stuff rather than just playing > around with ideas. > Who else other than me is still using webmacro and should I just continue to > work on my github branch and move forwards? Failing that, do people want me > to backport changes across to sourceforge? > Stuff that I have been initially working on in github is: > > removing the dependencies on the EDU.oswego.cs.dl.util.concurrent packages This is done: http://webmacro.sourceforge.net/dependencies.html > and using the java concurrent packages > adding in generics declarations as required so that the package will compile > cleanly against modern java. > > What I am planning to work on is: > > adding in support for invoking varargs methods from inside templates > a certain amount of refactoring to use more of google guava libraries as > appropriate > better error reporting on nested templet invocations I do not know about this, but would aim towards zero external dependencies. > If people want to let me know whether or not any of this is of interest to > anyone then we can work out how to move forwards. If I don't hear back from > anyone then I will assume that everyone has moved on to new pastures and I > will just continue down the path outlined above. I would like to understand why you and Guy have forked WM. Is it just because WM is not using Git? If so please, lets put the effort into getting the cvs to git transfer done. It seems that by using Guy's copy you have missed out on the work I have done and are proposing to redo it. It is great to see someone taking an interest, but I would really like it if this was going on within the project not outside. Git is great and I think WM should move to it, but to be using a copy before the trunk has been transferred seems a recipe for wasted work. cheers Tim -- Tim Pizey http://pizey.net/~timp |
From: Marcello H <mar...@gm...> - 2011-11-27 20:06:59
|
I have to admit that I don't use webmacro anymore, but somehow I still feel proud I was a user of it. It's good to see that there all still some of us left. If I ever take another job as webdeveloper or something like that, I will try to use it again. (I'm now a Personal Coach, programming people's minds...) Good luck with all of this, and I will stay on the list :-) Greetings from Holland, Marcel |
From: Alex F. <al...@fi...> - 2011-11-27 21:00:25
|
Tim On 27 November 2011 19:46, Tim Pizey <ti...@pa...> wrote: > Hi Alex, > > Great to hear from you, not so great that you have found a bug ! > :-) it is trivial to fix... > [snip] > > > So I'm going to patch EvalDirective to sort this out which brings me > onto my > > second point. > > I've been doing a bit of playing around with webmacro myself and I've > got a > > clone of the git repository that Guy Bolton-King took of the sourceforge > CVS > > repository and this is sitting at > https://github.com/alex-fiennes/webmacro > > I do not understand why you are using a copy of someone else's copy of > webmacro? You are a committer, so should be using the trunk. primarily because I initially made the github copy because I wanted to experiment with some ideas that might or might not have been sensible to include in the public viewpoint and it was so much easier to handle branches in git. > > This has been a gentle experiment so far because I haven't found anything > > that is actually broken yet, but come this bug then I suspect that I > might > > well start using my branch for production stuff rather than just playing > > around with ideas. > > Who else other than me is still using webmacro and should I just > continue to > > work on my github branch and move forwards? Failing that, do people > want me > > to backport changes across to sourceforge? > > > Stuff that I have been initially working on in github is: > > > > removing the dependencies on the EDU.oswego.cs.dl.util.concurrent > packages > > This is done: > > http://webmacro.sourceforge.net/dependencies.html > > I wasn't aware that this had been done. In fact I wasn't aware that anything had been done to webmacro for some time. This either means that my mail filters are misconfigured or I am not subscribed to the appropriate mailing lists. Has there been a release recently? > > and using the java concurrent packages > > adding in generics declarations as required so that the package will > compile > > cleanly against modern java. > > > > What I am planning to work on is: > > > > adding in support for invoking varargs methods from inside templates > > a certain amount of refactoring to use more of google guava libraries as > > appropriate > > better error reporting on nested templet invocations > > I do not know about this, but would aim towards zero external dependencies. I am still pondering things, but I like the caching tools that are being put into guava at present and I would definitely like to look at integration of the Broker to this. > > If people want to let me know whether or not any of this is of interest > to > > anyone then we can work out how to move forwards. If I don't hear back > from > > anyone then I will assume that everyone has moved on to new pastures and > I > > will just continue down the path outlined above. > > I would like to understand why you and Guy have forked WM. > I think that Guy didn't actually fork it but rather used it as a proof of concept to transfer CVS history into git. I don't think that he still has his github copy of it floating around. Mine is primarily because I wanted to play around with some ideas that might be controversial or at least involve changes to APIs and the like. > Is it just because WM is not using Git? > > If so please, lets put the effort into getting the cvs to git > transfer done. > In which case Guy has some scripts which will facilitate this, but I'll let him answer this. > It seems that by using Guy's copy you have missed out on the work > I have done and are proposing to redo it. > I've already redone it. We can compare notes... > It is great to see someone taking an interest, but I would really like > it if this was going on within the project not outside. > Git is great and I think WM should move to it, but to be using a copy > before the trunk has been transferred seems a recipe for wasted work. > I agree. I just wasn't aware that any work was taking place on trunk. I'll speak to Guy and review the differences between head on CVS and where I am at and make a decision as to the most sensible course of action. If we do switch to git, then will sourceforge support hosting this, or is github a more sensible place to put it? Alex -- Alex Fiennes email: al...@fi... mobile: +44 (0)7813 832662 office: +44 (0)1875 823 310 |
From: Tim P. <ti...@pa...> - 2011-11-27 23:18:52
|
On 27 November 2011 21:00, Alex Fiennes wrote: > If we do switch to git, then will sourceforge support hosting this, or is > github a more sensible place to put it? This is the question. My only experience of hosted git is on github. I have not looked at sourceforge, my guess is they are trying to keep up. It would be churlish after 12 years to desert sourceforge, if they have a credible offering. I know it can be done but I could not figure out how to make a project github repository - rather than a personal one, so when I moved melati I moved it to my personal hub. It would be nice to know 'the right way' to start a project repository. cheers Tim -- Tim Pizey http://pizey.net/~timp |
From: Guy B. K. <gu...@wa...> - 2011-11-29 23:15:16
|
On 27 Nov 2011, at 21:00, Alex Fiennes wrote: > On 27 November 2011 19:46, Tim Pizey <ti...@pa...> wrote: > > I do not understand why you are using a copy of someone else's copy of > webmacro? You are a committer, so should be using the trunk. > > primarily because I initially made the github copy because I wanted to experiment with some ideas that might or might not have been sensible to include in the public viewpoint and it was so much easier to handle branches in git. > > > This has been a gentle experiment so far because I haven't found anything > > that is actually broken yet, but come this bug then I suspect that I might > > well start using my branch for production stuff rather than just playing > > around with ideas. > > Who else other than me is still using webmacro and should I just continue to > > work on my github branch and move forwards? Failing that, do people want me > > to backport changes across to sourceforge? > > > Stuff that I have been initially working on in github is: > > > > removing the dependencies on the EDU.oswego.cs.dl.util.concurrent packages > > This is done: > > http://webmacro.sourceforge.net/dependencies.html > > > I wasn't aware that this had been done. In fact I wasn't aware that anything had been done to webmacro for some time. This either means that my mail filters are misconfigured or I am not subscribed to the appropriate mailing lists. Has there been a release recently? Sorry, I've not been checking my mail as rigorously as normal, so I've missed most of this thread. Picking up here (briefly) to dispel some confusion: The last change made to webmacro in CVS was on 2011-05-16: https://github.com/alex-fiennes/webmacro/commit/591206790c75d0f8419a4913657c49dc10b1e57c The change Tim made to dependencies was on 2010-02-21: https://github.com/alex-fiennes/webmacro/commit/1810052e862974cf4619532390dc0fa8cb5e5768 Both changes are included in the github repo; I don't know what additional changes Alex has made to the dependencies. In short: the github repo includes _all_ changes from the sourceforge CVS repo. No changes have been missed. If you wish to maintain a repo on sourceforge, I'd clone the github one and push it upstream to sourceforge's git hosting, and abandon the CVS repo: you can always take a copy of the old CVS repo from sourceforge beforehand, or I can send it to you as I have one. What I would advise against is backporting into the CVS tree, as at that point you will start to have to manually maintain two source trees in painfully different SCMs. Lastly, I apologise for appearing to have rail-roaded the move to git: in my defense, I'd like to point out that the git repo has enabled the experimental work that lead Alex to finding a bug, and that the git repo we now have (which tracks the 2.2 re-org correctly) records the history of this project with greater fidelity than CVS did. Best regards, and good luck, Guy. |
From: Tim P. <ti...@pa...> - 2011-11-29 23:49:32
|
On 29 November 2011 23:15, Guy Bolton King wrote: > > On 27 Nov 2011, at 21:00, Alex Fiennes wrote: > > On 27 November 2011 19:46, Tim Pizey wrote: >> >> I do not understand why you are using a copy of someone else's copy of >> webmacro? You are a committer, so should be using the trunk. > > primarily because I initially made the github copy because I wanted to > experiment with some ideas that might or might not have been sensible to > include in the public viewpoint and it was so much easier to handle branches > in git. > >> >> > This has been a gentle experiment so far because I haven't found >> > anything >> > that is actually broken yet, but come this bug then I suspect that I >> > might >> > well start using my branch for production stuff rather than just playing >> > around with ideas. >> > Who else other than me is still using webmacro and should I just >> > continue to >> > work on my github branch and move forwards? Failing that, do people >> > want me >> > to backport changes across to sourceforge? >> >> > Stuff that I have been initially working on in github is: >> > >> > removing the dependencies on the EDU.oswego.cs.dl.util.concurrent >> > packages >> >> This is done: >> >> http://webmacro.sourceforge.net/dependencies.html >> > > I wasn't aware that this had been done. In fact I wasn't aware that > anything had been done to webmacro for some time. This either means that my > mail filters are misconfigured or I am not subscribed to the appropriate > mailing lists. Has there been a release recently? > > Sorry, I've not been checking my mail as rigorously as normal, so I've > missed most of this thread. Picking up here (briefly) to dispel some > confusion: > The last change made to webmacro in CVS was on 2011-05-16: > https://github.com/alex-fiennes/webmacro/commit/591206790c75d0f8419a4913657c49dc10b1e57c > The change Tim made to dependencies was on 2010-02-21: > https://github.com/alex-fiennes/webmacro/commit/1810052e862974cf4619532390dc0fa8cb5e5768 > Both changes are included in the github repo; I don't know what additional > changes Alex has made to the dependencies. > In short: the github repo includes _all_ changes from the sourceforge CVS > repo. No changes have been missed. > If you wish to maintain a repo on sourceforge, I'd clone the github one and > push it upstream to sourceforge's git hosting, and abandon the CVS repo: you > can always take a copy of the old CVS repo from sourceforge beforehand, or I > can send it to you as I have one. > What I would advise against is backporting into the CVS tree, as at that > point you will start to have to manually maintain two source trees in > painfully different SCMs. > Lastly, I apologise for appearing to have rail-roaded the move to git: in my > defense, I'd like to point out that the git repo has enabled the > experimental work that lead Alex to finding a bug, and that the git repo we > now have (which tracks the 2.2 re-org correctly) records the history of this > project with greater fidelity than CVS did. > Best regards, and good luck, > Guy. This all seems great, and I agree (I was not aware that I had damaged history) . All that is required, I think, is to enable a git repository through the sourceforge interface, which creates an empty repository, and push Alex's repository to that and fix the POM to reflect the SCM change. I think this is great. cheers Tim -- Tim Pizey http://pizey.net/~timp |
From: Alex F. <al...@fi...> - 2011-11-30 00:38:54
|
On 29 November 2011 23:15, Guy Bolton King <gu...@wa...> wrote: <snip> > Sorry, I've not been checking my mail as rigorously as normal, so I've > missed most of this thread. Picking up here (briefly) to dispel some > confusion: > > The last change made to webmacro in CVS was on 2011-05-16: > > > https://github.com/alex-fiennes/webmacro/commit/591206790c75d0f8419a4913657c49dc10b1e57c > > The change Tim made to dependencies was on 2010-02-21: > > > https://github.com/alex-fiennes/webmacro/commit/1810052e862974cf4619532390dc0fa8cb5e5768 > > Both changes are included in the github repo; I don't know what additional > changes Alex has made to the dependencies. > I've review the commit at https://github.com/alex-fiennes/webmacro/commit/79b05cdccea0dfaf4ebc0ae30e6ea60372c9d96eand I suspect that I had jumped to conclusions. A combination of missing the commit that happened post 2.1 to switch to java.util.concurrent, and then running eclipse's Tidy Imports routine when I first checked out the github repo, and then reviewing Broker and noticing that it had added java.util.concurrent.ConcurrentHashMap (and failing to notice that it had actually just re-ordered the imports) made me assume that switching across to java.util.concurrent had been done by me rather than Tim. Sorry for the confusion... > In short: the github repo includes _all_ changes from the sourceforge CVS > repo. No changes have been missed. > > If you wish to maintain a repo on sourceforge, I'd clone the github one > and push it upstream to sourceforge's git hosting, and abandon the CVS > repo: you can always take a copy of the old CVS repo from sourceforge > beforehand, or I can send it to you as I have one. > > What I would advise against is backporting into the CVS tree, as at that > point you will start to have to manually maintain two source trees in > painfully different SCMs. > utterly agree. it probably makes sense if people who care about what direction things go in review the commits that I've made to date ( https://github.com/alex-fiennes/webmacro/commits/master) and if they are all fine then we can make this into the current master branch. If any of it is problematic then I can talk to Guy about setting it up in a branch. Once this has been done, then we should have a chat about how we are going to move ahead with new development work. However I suspect that I will just make a skunkworks branch and play around with things. I would really like to get error messages to be a little bit easier to debug when you have deeply nested #eval statements... > Lastly, I apologise for appearing to have rail-roaded the move to git: in > my defense, I'd like to point out that the git repo has enabled the > experimental work that lead Alex to finding a bug, and that the git repo we > now have (which tracks the 2.2 re-org correctly) records the history of > this project with greater fidelity than CVS did. > Yup. I had fully intended to have this conversation at an earlier date, but I wasn't expecting to find anything that I though might need to go back into the public stuff and was just preparing to experiment a bit so just pressed on with things. However I think that the end result might be quite good. How many people on this list might be interested in getting into design decisions for future development on webmacro? Alex > Best regards, and good luck, > > Guy. > -- Alex Fiennes email: al...@fi... mobile: +44 (0)7813 832662 office: +44 (0)1875 823 310 |