You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2020/01/24 09:52:57 UTC

svn commit: r1873095 - in /velocity/site/cms/trunk/content/engine: 2.0/upgrading.mdtext 2.1/upgrading.mdtext 2.2/upgrading.mdtext devel/upgrading.mdtext

Author: cbrisson
Date: Fri Jan 24 09:52:56 2020
New Revision: 1873095

URL: http://svn.apache.org/viewvc?rev=1873095&view=rev
Log:
[site/engine] Add a note about Velocimacro behavior changes in 1.7 to 2.0 upgrading notes

Modified:
    velocity/site/cms/trunk/content/engine/2.0/upgrading.mdtext
    velocity/site/cms/trunk/content/engine/2.1/upgrading.mdtext
    velocity/site/cms/trunk/content/engine/2.2/upgrading.mdtext
    velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext

Modified: velocity/site/cms/trunk/content/engine/2.0/upgrading.mdtext
URL: http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/2.0/upgrading.mdtext?rev=1873095&r1=1873094&r2=1873095&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/2.0/upgrading.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/2.0/upgrading.mdtext Fri Jan 24 09:52:56 2020
@@ -47,9 +47,11 @@ Read below for futher details.
 + method arguments can be arithmetic expressions
 + method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property `runtime.conversion.handler = none`.
 + space gobbling (to control the indentation of generated code) is now configurable via the `space.gobbing` configuration key, which can take the following values: `none`, `bc` (aka. backward compatible), `lines` and `structured`. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to `bc`.
-+ The #foreach predefined references `$velocityCount` and `$velocityHasNext` have been removed. Use `$foreach.count` (1-based), `$foreach.index` (0-based) and `foreach.hasNext()`.
++ the #foreach predefined references `$velocityCount` and `$velocityHasNext` have been removed. Use `$foreach.count` (1-based), `$foreach.index` (0-based) and `foreach.hasNext()`.
++ Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
++ Velocimacros do not anymore have a *proxy context* of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
 
-### Dependency changes:
+### Dependency Changes
 
 + Velocity now requires a JDK version of 1.7 or higher.
 + commons-collections and commons-logging aren't needed any more at runtime.

Modified: velocity/site/cms/trunk/content/engine/2.1/upgrading.mdtext
URL: http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/2.1/upgrading.mdtext?rev=1873095&r1=1873094&r2=1873095&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/2.1/upgrading.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/2.1/upgrading.mdtext Fri Jan 24 09:52:56 2020
@@ -99,6 +99,8 @@ Read below for futher details.
 + method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property `runtime.conversion.handler.class = none`.
 + space gobbling (to control the indentation of generated code) is now configurable via the `space.gobbing` configuration key, which can take the following values: `none`, `bc` (aka. backward compatible), `lines` and `structured`. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to `bc`.
 + the #foreach predefined references `$velocityCount` and `$velocityHasNext` have been removed. Use `$foreach.count` (1-based), `$foreach.index` (0-based) and `foreach.hasNext()`.
++ Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
++ Velocimacros do not anymore have a *proxy context* of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
 
 ### Dependency Changes
 

Modified: velocity/site/cms/trunk/content/engine/2.2/upgrading.mdtext
URL: http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/2.2/upgrading.mdtext?rev=1873095&r1=1873094&r2=1873095&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/2.2/upgrading.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/2.2/upgrading.mdtext Fri Jan 24 09:52:56 2020
@@ -146,6 +146,8 @@ Read below for futher details.
 + method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property `runtime.conversion.handler.class = none`.
 + space gobbling (to control the indentation of generated code) is now configurable via the `space.gobbing` configuration key, which can take the following values: `none`, `bc` (aka. backward compatible), `lines` and `structured`. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to `bc`.
 + the #foreach predefined references `$velocityCount` and `$velocityHasNext` have been removed. Use `$foreach.count` (1-based), `$foreach.index` (0-based) and `foreach.hasNext()`.
++ Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
++ Velocimacros do not anymore have a *proxy context* of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
 
 ### Dependency Changes
 

Modified: velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext
URL: http://svn.apache.org/viewvc/velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext?rev=1873095&r1=1873094&r2=1873095&view=diff
==============================================================================
--- velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext (original)
+++ velocity/site/cms/trunk/content/engine/devel/upgrading.mdtext Fri Jan 24 09:52:56 2020
@@ -146,6 +146,8 @@ Read below for futher details.
 + method arguments are now converted as needed between all main basic Java standard types (booleans, numbers and strings). If you want to revert to the 1.x behavior, set the property `runtime.conversion.handler.class = none`.
 + space gobbling (to control the indentation of generated code) is now configurable via the `space.gobbing` configuration key, which can take the following values: `none`, `bc` (aka. backward compatible), `lines` and `structured`. See the related documentation section for details. To maximize backward compatibility with 1.x, set it to `bc`.
 + the #foreach predefined references `$velocityCount` and `$velocityHasNext` have been removed. Use `$foreach.count` (1-based), `$foreach.index` (0-based) and `foreach.hasNext()`.
++ Velocimacro arguments are now evaluated only once (instead of each time they were referenced inside the macro body as was the case for v1.7) and passed by value (or more precisely as reference after evaluation).
++ Velocimacros do not anymore have a *proxy context* of their own - if they do insert new values in the context, and then call an external code changing those values, they will now see the new values.
 
 ### Dependency Changes