Re: Please test/review FreeMarker 2.3.28

2018-03-23 Thread Woonsan Ko
When I tested with freemarker-2.3.28-incubating-SNAPSHOT.jar, which I
built and install it to my local maven repo from the latest "2.3"
branch myself, in my applications, I haven't found any regressions.
My applications are rather simpler probably than others as they simply
render model objects passed from request attributes through
FreeMarkerServlet.
But when I tried the new features and bug fixes [1], I think I found
somethings (perhaps there could be my misunderstandings):

1. The template example in
https://freemarker.apache.org/builds/fm2.3.28/ref_specvar.html#ref_specvar_get_optional_template

  <#assign optTemp = .get_optional_template('some.ftl')>
  <#if optTemp.exists>

  But if the 'some.ftl' doesn't exist, optTemp.exists fails as it's
null. So I ended up changing it to this:

  <#assign optTemp = .get_optional_template('some.ftl')>
  <#if optTemp?? && optTemp.exists>

2. Square bracket syntax through ftl directive

It reads, "This directive also determines if the template uses angle
bracket syntax (e.g. <#include 'foo.ftl'>) or square bracket syntax
(e.g. [#include 'foo.ftl']). Simply, the syntax used for this
directive will be the syntax used for the whole template, regardless
of the FreeMarker configuration settings." [2]

I applied it to an included .ftl template like this:

[#ftl output_format="HTML"]
[="Hello"]
${"Hello"}

It prints: [="Hello"] Hello,
not: Hello ${"Hello"}

3. split with an empty string

It says, "Bug fixed: When string?split(separator) is called with "" as
the argument, the string will be split to characters now. Earlier it
has thrown an IllegalArgumentException (unless the r flag was
specified)."
But when I tried it, it throws an IllegalArgumentException:

<#assign a="hello"?split("l")>
==>
java.lang.IllegalArgumentException: The separator string has 0 length
at freemarker.template.utility.StringUtil.split(StringUtil.java:752)

Please let me know if I miss or misinterpret somethings.

Cheers,

Woonsan

[1] https://freemarker.apache.org/builds/fm2.3.28/versions_2_3_28.html
[2] https://freemarker.apache.org/builds/fm2.3.28/ref_directive_ftl.html

On Fri, Mar 23, 2018 at 4:08 AM, Daniel Dekany  wrote:
> Friday, March 23, 2018, 3:33:39 AM, Woonsan Ko wrote:
>
>> Great to see the real release without "incubating" mark soon!
>
> In theory it was decided 2 days ago, but I saw nothing about the board
> meeting so far. I guess they are overburdened with the May elections
> and all that.
>
>> Also ! I've just read the Change log and everything is awesome!
>> I'll just try out the snapshot binary tomorrow in our applications to
>> see if there's any regression just in case.
>
> Great, thanks!
>
>> Cheers,
>>
>> Woonsan
>>
>>
>> On Tue, Mar 20, 2018 at 6:39 PM, Daniel Dekany  wrote:
>>> Before we start a VOTE on releasing 2.3.28, it would be good if more
>>> of you can test it, or otherwise review the upcoming 2.3.28! The main
>>> point in this phase is to catch technical issues.
>>>
>>> If you intend to help, but won't have time for it in the coming few
>>> days, please indicate that, so that I know that I should wait!
>>>
>>> Change log (so far, but I don't plan to add more):
>>> https://freemarker.apache.org/builds/fm2.3.28/versions_2_3_28.html
>>>
>>> Binary release artifacts:
>>> https://dist.apache.org/repos/dist/dev/incubator/freemarker/engine/2.3.28-incubating-SNAPSHOT/binaries/
>>>
>>> Source release artifacts:
>>> https://dist.apache.org/repos/dist/dev/incubator/freemarker/engine/2.3.28-incubating-SNAPSHOT/source/
>>>
>>> The Maven artifacts are available from the Apache snaphsot repository:
>>>
>>>   
>>> apache-snapshot-repository
>>> https://repository.apache.org/content/repositories/snapshots/
>>> false
>>> true
>>>   
>>>
>>> under the coordinates:
>>>
>>>   org.freemarker
>>>   freemarker
>>>   2.3.28-incubating-SNAPSHOT
>>>
>>> and for the Google App Engine compatible (GAE) version:
>>>
>>>   org.freemarker
>>>   freemarker-gae
>>>   2.3.28-incubating-SNAPSHOT
>>>
>>> The ASF Board will decide tomorrow (21th) if FreeMarker can graduate.
>>> If everything goes well, this release won't have "incubating" in its
>>> version number. This will be the first such release since mid 2015
>>> (2.3.23).
>>>
>>> --
>>> Thanks,
>>>  Daniel Dekany
>>>
>>
>
> --
> Thanks,
>  Daniel Dekany
>


Re: FreeMarker has graduated to TLP!

2018-03-23 Thread Woonsan Ko
What an exciting moment! Let's keep moving on!

Cheers,

Woonsan

On Fri, Mar 23, 2018 at 7:26 PM, Ralph Goers  wrote:
> Congrats!
>
> Ralph
>
>> On Mar 23, 2018, at 3:50 PM, Lalish-Menagh, Trevor  
>> wrote:
>>
>> How exciting! Congrats to all the dedicated volunteers that made this a 
>> reality!
>>
>> On Fri, Mar 23, 2018 at 1:27 PM, Jacques Le Roux
>>  wrote:
>>> Congratulations Daniel and to all the persons who participated to this
>>> endeavour. A new one begins :)
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 23/03/2018 à 20:59, Daniel Dekany a écrit :

 To quote the relevant part from the ASF Board Meeting Summary of March
 21, 2018:

   The following resolutions were passed unanimously:

 A. Establish the Apache FreeMarker Project (Dániel Dékány VP)

 So now that this uncertainty was eliminated, we can feel much more
 motivated to push FM ahead. We were awarded with the additional trust
 associated to the "Apache" brand, so let's put code behind it that
 fits the modern standards, by which I mean FM3. Of course, FM2 also
 needs to be maintained, even receive new features. But I believe FM3
 is absolutely necessary for growth, adoption in new projects.

 It will take a while until all the "paper work" and infrastructural
 changes are done
 (https://incubator.apache.org/guides/transferring.html). But we don't
 have to wait for all of that to release 2.3.28 as non-incubating, so I
 hope that will be done sometimes next week.

>>>
>>
>>
>>
>> --
>> Trevor Lalish-Menagh
>> about.me/trevmex
>>
>
>


Re: FreeMarker has graduated to TLP!

2018-03-23 Thread Ralph Goers
Congrats!

Ralph

> On Mar 23, 2018, at 3:50 PM, Lalish-Menagh, Trevor  
> wrote:
> 
> How exciting! Congrats to all the dedicated volunteers that made this a 
> reality!
> 
> On Fri, Mar 23, 2018 at 1:27 PM, Jacques Le Roux
>  wrote:
>> Congratulations Daniel and to all the persons who participated to this
>> endeavour. A new one begins :)
>> 
>> Jacques
>> 
>> 
>> 
>> Le 23/03/2018 à 20:59, Daniel Dekany a écrit :
>>> 
>>> To quote the relevant part from the ASF Board Meeting Summary of March
>>> 21, 2018:
>>> 
>>>   The following resolutions were passed unanimously:
>>> 
>>> A. Establish the Apache FreeMarker Project (Dániel Dékány VP)
>>> 
>>> So now that this uncertainty was eliminated, we can feel much more
>>> motivated to push FM ahead. We were awarded with the additional trust
>>> associated to the "Apache" brand, so let's put code behind it that
>>> fits the modern standards, by which I mean FM3. Of course, FM2 also
>>> needs to be maintained, even receive new features. But I believe FM3
>>> is absolutely necessary for growth, adoption in new projects.
>>> 
>>> It will take a while until all the "paper work" and infrastructural
>>> changes are done
>>> (https://incubator.apache.org/guides/transferring.html). But we don't
>>> have to wait for all of that to release 2.3.28 as non-incubating, so I
>>> hope that will be done sometimes next week.
>>> 
>> 
> 
> 
> 
> -- 
> Trevor Lalish-Menagh
> about.me/trevmex
> 




Re: FreeMarker has graduated to TLP!

2018-03-23 Thread Lalish-Menagh, Trevor
How exciting! Congrats to all the dedicated volunteers that made this a reality!

On Fri, Mar 23, 2018 at 1:27 PM, Jacques Le Roux
 wrote:
> Congratulations Daniel and to all the persons who participated to this
> endeavour. A new one begins :)
>
> Jacques
>
>
>
> Le 23/03/2018 à 20:59, Daniel Dekany a écrit :
>>
>> To quote the relevant part from the ASF Board Meeting Summary of March
>> 21, 2018:
>>
>>The following resolutions were passed unanimously:
>>
>>  A. Establish the Apache FreeMarker Project (Dániel Dékány VP)
>>
>> So now that this uncertainty was eliminated, we can feel much more
>> motivated to push FM ahead. We were awarded with the additional trust
>> associated to the "Apache" brand, so let's put code behind it that
>> fits the modern standards, by which I mean FM3. Of course, FM2 also
>> needs to be maintained, even receive new features. But I believe FM3
>> is absolutely necessary for growth, adoption in new projects.
>>
>> It will take a while until all the "paper work" and infrastructural
>> changes are done
>> (https://incubator.apache.org/guides/transferring.html). But we don't
>> have to wait for all of that to release 2.3.28 as non-incubating, so I
>> hope that will be done sometimes next week.
>>
>



-- 
Trevor Lalish-Menagh
about.me/trevmex


Re: FreeMarker has graduated to TLP!

2018-03-23 Thread Jacques Le Roux

Congratulations Daniel and to all the persons who participated to this 
endeavour. A new one begins :)

Jacques


Le 23/03/2018 à 20:59, Daniel Dekany a écrit :

To quote the relevant part from the ASF Board Meeting Summary of March
21, 2018:

   The following resolutions were passed unanimously:

     A. Establish the Apache FreeMarker Project (Dániel Dékány VP)

So now that this uncertainty was eliminated, we can feel much more
motivated to push FM ahead. We were awarded with the additional trust
associated to the "Apache" brand, so let's put code behind it that
fits the modern standards, by which I mean FM3. Of course, FM2 also
needs to be maintained, even receive new features. But I believe FM3
is absolutely necessary for growth, adoption in new projects.

It will take a while until all the "paper work" and infrastructural
changes are done
(https://incubator.apache.org/guides/transferring.html). But we don't
have to wait for all of that to release 2.3.28 as non-incubating, so I
hope that will be done sometimes next week.





FreeMarker has graduated to TLP!

2018-03-23 Thread Daniel Dekany
To quote the relevant part from the ASF Board Meeting Summary of March
21, 2018:

  The following resolutions were passed unanimously:

    A. Establish the Apache FreeMarker Project (Dániel Dékány VP)

So now that this uncertainty was eliminated, we can feel much more
motivated to push FM ahead. We were awarded with the additional trust
associated to the "Apache" brand, so let's put code behind it that
fits the modern standards, by which I mean FM3. Of course, FM2 also
needs to be maintained, even receive new features. But I believe FM3
is absolutely necessary for growth, adoption in new projects.

It will take a while until all the "paper work" and infrastructural
changes are done
(https://incubator.apache.org/guides/transferring.html). But we don't
have to wait for all of that to release 2.3.28 as non-incubating, so I
hope that will be done sometimes next week.

-- 
Thanks,
 Daniel Dekany



Re: Willing to contribute to Apache Free Marker

2018-03-23 Thread Daniel Dekany
What do you mean exactly? Like what speciality or difficulty you try
to address?

Friday, March 23, 2018, 6:56:47 PM, Randika Navagamuwa wrote:

> Hi all,
>
> What is the most preferred way of debugging FM3 while developing?
>
> Regards,
>
>
> *Randika Navagamuwa,*
>
> *Software Engineer,*
> *AdroitLogic Lanka (Pvt) Ltd.*
> *www.rnavagamuwa.com *
>  [image:
> https://www.facebook.com/rnavagamuwa]
> 
>    [image:
> https://plus.google.com/+RandikaNavagamuwa/]
> 
> 
>
> On Sun, Mar 18, 2018 at 10:44 AM, Randika Navagamuwa <
> randikanavagam...@gmail.com> wrote:
>
>> Hi Woonsan,
>>
>>  Thanks a lot for the detailed clarification. I'll look into these and get
>> back to you.
>>
>> Regards,
>> Randika
>>
>>
>> *Randika Navagamuwa,*
>>
>> *Software Engineer,*
>> *AdroitLogic Lanka (Pvt) Ltd.*
>> *www.rnavagamuwa.com *
>>  [image:
>> https://www.facebook.com/rnavagamuwa]
>>    
>> [image:
>> https://plus.google.com/+RandikaNavagamuwa/]
>> 
>> 
>>
>> On Sun, Mar 18, 2018 at 12:56 AM, Woonsan Ko  wrote:
>>
>>> Hi Randika,
>>>
>>> Welcome! :-)
>>> Regarding the Spring Framework integration support, we have made some
>>> progress in "3" branch:
>>> - https://github.com/apache/incubator-freemarker/tree/3
>>>
>>> There is also a brief summary what has been done so far:
>>> - https://github.com/apache/incubator-freemarker/blob/3/FM3-
>>> CHANGE-LOG.txt#L501
>>>
>>> Basically, basic view resolver support and spring bean wiring has been
>>> done. Also, basic directive and function models to replace Spring JSP
>>> Taglibs were done. So, I would say Spring Framework integration with
>>> FreeMarker 3 is kind of working already with basic directives/functions
>>> support already, but we need to add more to support form directives, too.
>>> I think I've implemented about half of directive and function models to
>>> replace Spring Framework Form JSP Taglibs as well. I still need to add
>>> directives to replace OptionsTag, CheckboxesTag, RadioButtonsTag,
>>> CheckboxTag and RadioButtonTag. Of course, even after we add the remaining
>>> form models, we have to pass thorough testing and validation on potential
>>> issues (e.g, escaping issue).
>>>
>>> I hope you take a look around those and understand how the
>>> directives/functions work in FM3.
>>> I'm looking forward to working with you, getting insights and sharing
>>> thoughts! :-)
>>>
>>> You can build the branch with Gradle and you can browse the unit tests as
>>> well. Here are some links:
>>> - To build: https://github.com/apache/incubator-freemarker/blob/
>>> 3/README.md#building-freemarker
>>> - Test cases under https://github.com/apache/incubator-freemarker/tree/3/
>>> freemarker-spring/src/test/. And you will see test .ftlh file resources
>>> under https://github.com/apache/incubator-freemarker/tree/3/
>>> freemarker-spring/src/test/resources/META-INF. too.
>>>
>>> Please feel free to ask anything. You can start forking and creating a
>>> pull request if anything is ready.
>>> Finally, you can also browse old threads from here:
>>> - https://lists.apache.org/list.html?d...@freemarker.apache.org
>>>
>>> Kind regards,
>>>
>>> Woonsan
>>>
>>>
>>> On Sat, Mar 17, 2018 at 2:07 PM, Randika Navagamuwa <
>>> randikanavagam...@gmail.com> wrote:
>>>
 Hi Dianel and Angelo,

 Thanks for the information. Yes, Eclipse Che uses LSP4J and I'm
 interested in that, but I'm more interested in supporting frameworks
 and IDE-s. I've gone through the provided link regarding FM3 but still,
 there are lot things which I don't understand properly. You have mentioned
 that Woonsan Ko has already implemented a lot of Spring integration. I
 would love to take a look at his code so we can figure out what should/can
 be improved.

 At the moment, I haven't decided on what I want to do in this project.
 Still, I'm trying to understand how can I be a help to FM, so I'm open to
 any suggestion.

 I've gone through the issue[1] created by Angelo and I would love to
 know the opinion of others as well. My personal preference is to go with
 the first solution which is to "Create a custom parser".

 [1] https://github.com/angelozerr/freemarker-languageserver/issues/1

 Regards,


 *Randika Navagamuwa,*

 *Software Engineer,*
 *AdroitLogic Lanka (Pvt) Ltd.*
 *www.rnavagamuwa.com *
  [image:
 https://www.facebook.com/rnavagamuwa]
 

Re: Willing to contribute to Apache Free Marker

2018-03-23 Thread Randika Navagamuwa
Hi all,

What is the most preferred way of debugging FM3 while developing?

Regards,


*Randika Navagamuwa,*

*Software Engineer,*
*AdroitLogic Lanka (Pvt) Ltd.*
*www.rnavagamuwa.com *
 [image:
https://www.facebook.com/rnavagamuwa] 
   [image:
https://plus.google.com/+RandikaNavagamuwa/]



On Sun, Mar 18, 2018 at 10:44 AM, Randika Navagamuwa <
randikanavagam...@gmail.com> wrote:

> Hi Woonsan,
>
>  Thanks a lot for the detailed clarification. I'll look into these and get
> back to you.
>
> Regards,
> Randika
>
>
> *Randika Navagamuwa,*
>
> *Software Engineer,*
> *AdroitLogic Lanka (Pvt) Ltd.*
> *www.rnavagamuwa.com *
>  [image:
> https://www.facebook.com/rnavagamuwa]
>    
> [image:
> https://plus.google.com/+RandikaNavagamuwa/]
> 
> 
>
> On Sun, Mar 18, 2018 at 12:56 AM, Woonsan Ko  wrote:
>
>> Hi Randika,
>>
>> Welcome! :-)
>> Regarding the Spring Framework integration support, we have made some
>> progress in "3" branch:
>> - https://github.com/apache/incubator-freemarker/tree/3
>>
>> There is also a brief summary what has been done so far:
>> - https://github.com/apache/incubator-freemarker/blob/3/FM3-
>> CHANGE-LOG.txt#L501
>>
>> Basically, basic view resolver support and spring bean wiring has been
>> done. Also, basic directive and function models to replace Spring JSP
>> Taglibs were done. So, I would say Spring Framework integration with
>> FreeMarker 3 is kind of working already with basic directives/functions
>> support already, but we need to add more to support form directives, too.
>> I think I've implemented about half of directive and function models to
>> replace Spring Framework Form JSP Taglibs as well. I still need to add
>> directives to replace OptionsTag, CheckboxesTag, RadioButtonsTag,
>> CheckboxTag and RadioButtonTag. Of course, even after we add the remaining
>> form models, we have to pass thorough testing and validation on potential
>> issues (e.g, escaping issue).
>>
>> I hope you take a look around those and understand how the
>> directives/functions work in FM3.
>> I'm looking forward to working with you, getting insights and sharing
>> thoughts! :-)
>>
>> You can build the branch with Gradle and you can browse the unit tests as
>> well. Here are some links:
>> - To build: https://github.com/apache/incubator-freemarker/blob/
>> 3/README.md#building-freemarker
>> - Test cases under https://github.com/apache/incubator-freemarker/tree/3/
>> freemarker-spring/src/test/. And you will see test .ftlh file resources
>> under https://github.com/apache/incubator-freemarker/tree/3/
>> freemarker-spring/src/test/resources/META-INF. too.
>>
>> Please feel free to ask anything. You can start forking and creating a
>> pull request if anything is ready.
>> Finally, you can also browse old threads from here:
>> - https://lists.apache.org/list.html?d...@freemarker.apache.org
>>
>> Kind regards,
>>
>> Woonsan
>>
>>
>> On Sat, Mar 17, 2018 at 2:07 PM, Randika Navagamuwa <
>> randikanavagam...@gmail.com> wrote:
>>
>>> Hi Dianel and Angelo,
>>>
>>> Thanks for the information. Yes, Eclipse Che uses LSP4J and I'm
>>> interested in that, but I'm more interested in supporting frameworks
>>> and IDE-s. I've gone through the provided link regarding FM3 but still,
>>> there are lot things which I don't understand properly. You have mentioned
>>> that Woonsan Ko has already implemented a lot of Spring integration. I
>>> would love to take a look at his code so we can figure out what should/can
>>> be improved.
>>>
>>> At the moment, I haven't decided on what I want to do in this project.
>>> Still, I'm trying to understand how can I be a help to FM, so I'm open to
>>> any suggestion.
>>>
>>> I've gone through the issue[1] created by Angelo and I would love to
>>> know the opinion of others as well. My personal preference is to go with
>>> the first solution which is to "Create a custom parser".
>>>
>>> [1] https://github.com/angelozerr/freemarker-languageserver/issues/1
>>>
>>> Regards,
>>>
>>>
>>> *Randika Navagamuwa,*
>>>
>>> *Software Engineer,*
>>> *AdroitLogic Lanka (Pvt) Ltd.*
>>> *www.rnavagamuwa.com *
>>>  [image:
>>> https://www.facebook.com/rnavagamuwa]
>>> 
>>>  [image:
>>> https://plus.google.com/+RandikaNavagamuwa/]
>>> 
>>> 
>>>
>>> On Sat, Mar 17, 2018 at 10:00 PM, Angelo zerr 
>>> wrote:
>>>
 Hi 

Re: Please test/review FreeMarker 2.3.28

2018-03-23 Thread Daniel Dekany
Friday, March 23, 2018, 3:33:39 AM, Woonsan Ko wrote:

> Great to see the real release without "incubating" mark soon!

In theory it was decided 2 days ago, but I saw nothing about the board
meeting so far. I guess they are overburdened with the May elections
and all that.

> Also ! I've just read the Change log and everything is awesome!
> I'll just try out the snapshot binary tomorrow in our applications to
> see if there's any regression just in case.

Great, thanks!

> Cheers,
>
> Woonsan
>
>
> On Tue, Mar 20, 2018 at 6:39 PM, Daniel Dekany  wrote:
>> Before we start a VOTE on releasing 2.3.28, it would be good if more
>> of you can test it, or otherwise review the upcoming 2.3.28! The main
>> point in this phase is to catch technical issues.
>>
>> If you intend to help, but won't have time for it in the coming few
>> days, please indicate that, so that I know that I should wait!
>>
>> Change log (so far, but I don't plan to add more):
>> https://freemarker.apache.org/builds/fm2.3.28/versions_2_3_28.html
>>
>> Binary release artifacts:
>> https://dist.apache.org/repos/dist/dev/incubator/freemarker/engine/2.3.28-incubating-SNAPSHOT/binaries/
>>
>> Source release artifacts:
>> https://dist.apache.org/repos/dist/dev/incubator/freemarker/engine/2.3.28-incubating-SNAPSHOT/source/
>>
>> The Maven artifacts are available from the Apache snaphsot repository:
>>
>>   
>> apache-snapshot-repository
>> https://repository.apache.org/content/repositories/snapshots/
>> false
>> true
>>   
>>
>> under the coordinates:
>>
>>   org.freemarker
>>   freemarker
>>   2.3.28-incubating-SNAPSHOT
>>
>> and for the Google App Engine compatible (GAE) version:
>>
>>   org.freemarker
>>   freemarker-gae
>>   2.3.28-incubating-SNAPSHOT
>>
>> The ASF Board will decide tomorrow (21th) if FreeMarker can graduate.
>> If everything goes well, this release won't have "incubating" in its
>> version number. This will be the first such release since mid 2015
>> (2.3.23).
>>
>> --
>> Thanks,
>>  Daniel Dekany
>>
>

-- 
Thanks,
 Daniel Dekany