Hi Daniel, Thank you, very informative.
I guess we will take this back to our ML in ofbiz, but I imagine as a general rule that we should keep our trunk (master branch) always compatible with the latest FreeMarker requirements. We rarely hit problems in upgrade anyway, that's why I thought we should go for the latest by default. I will think about your recommendations some more though. Thank you. On Sun, Apr 1, 2018, 10:57 AM Daniel Dekany <ddek...@apache.org> wrote: > Sunday, April 1, 2018, 8:00:52 AM, Taher Alkhateeb wrote: > > > We are using a lot of libraries in OFBiz, yet freemarker is the only one > > where we have to first bump up the dependency version + update the java > > integration work. > > You don't *have* to improve the incompatibleImprovemetns after an > upgrade. In principle you only do that after you have reviewed that > the changes affect you, otherwise you stick to the > incompatibleImprovemetns that was used when your project was started. > > You don't do it with other libraries because they have no similar > capability. They either behave as if you always just use `new > Configuration()` (which is the same as `new > Configuration(VERSION_2_3_0)`), or they don't care about backward > compatibility that much. > > See also: > > https://freemarker.apache.org/docs/pgui_config_incompatible_improvements.html > > > Can't we have a constructor argument in freemarker.template.Configuration > > like say VERSION_LATEST instead of hard-coding the compatibility version? > > There's a static Configuration.getVersion() method which returns the > current version, but please don't use it as incompatibleImprovements. > Certainly doing that will throw IllegalArgumentException if there will > be a 2.4.0. > > > We always want to update our code to be compatible with the latest > version > > of FreeMarker. > > > > I'm not aware of the history, is there a reason why Configuration() is > > deprecated? > > Because it's harmful for new projects to stick to 100% 2.3.0 > compatibility. If it wasn't deprecated, most project would just use > that, without realizing what it means. > > > On Sun, Apr 1, 2018, 8:38 AM Jacopo Cappellato < > jacopo.cappell...@gmail.com> > > wrote: > > > >> On Sat, Mar 31, 2018 at 11:06 PM, Jacques Le Roux < > >> jacques.le.r...@les7arts.com> wrote: > >> > >> > Thanks Jacopo, > >> > > >> > Yes, that's what I have used. > >> > >> > >> No, your patch is different from mine and this is why it is not able to > >> fetch the files from the staging Maven repository. Please check the > >> differences of the line numbers of the first chunks of the patches. > >> > >> Jacopo > >> > > -- > Thanks, > Daniel Dekany > >