Debian Codegraph @

NEWS

raw
1 == 08 March 2020 ==
2
3 Ctemplate 2.4
4 Switch to Python 3
5
6 == 19 March 2014 ==
7
8 Ctemplate 2.3 has been released. Fixed some more C++11 issues.
9 Removed deprecated Template::SetEscapedValueAndShowSection() and Template::ReloadIfChanged().
10
11 == 18 April 2012 ==
12
13 Ctemplate 2.2 has been released. Several issues reported by G++ 4.7 have been fixed.
14
15 == 22 March 2012 ==
16
17 2.1 has been released. operator[] has been added to TemplateDictionary.
18
19 == 24 January 2012 ==
20
21 I've just released ctemplate 2.0. It has no functional changes from
22 ctemplate 1.2.
23
24 The `google-ctemplate` project has been renamed to `ctemplate`. I
25 (csilvers) am stepping down as maintainer, to be replaced by Olaf van
26 der Spek. Welcome to the team, Olaf! I've been impressed by your
27 contributions to the project discussions and code to date, and look
28 forward to having you on the team.
29
30 I bumped the major version number up to 2 to reflect the new community
31 ownership of the project. All the
32 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-2.0/ChangeLog changes]
33 are related to the renaming.
34
35
36 === 18 January 2011 ===
37
38 The `google-ctemplate` Google Code page has been renamed to
39 `ctemplate`, in preparation for the project being renamed to
40 `ctemplate`. In the coming weeks, I'll be stepping down as
41 maintainer for the ctemplate project, and as part of that Google is
42 relinquishing ownership of the project; it will now be entirely
43 community run. The name change reflects that shift.
44
45 === 22 December 2011 ===
46
47 I've just released ctemplate 1.1. The only functionality change is
48 obscure: when a reload is done (via, say, `ReloadAllIfChanged`), and a
49 new file has been created since the last reload that both a) has the
50 same filename as a template file that had been loaded in the past, and
51 b) is earlier on the template search-path than the previously loaded
52 file, *and* c) the previously loaded file hasn't changed since the
53 last reload, then at reload-time we now load the new file into the
54 template, replacing the old file. Before we would only load the new
55 file if the old file had changed on disk, and would otherwise leave
56 the template alone. Even more minor changes are in the
57 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-1.1/ChangeLog ChangeLog].
58
59 === 26 August 2011 ===
60
61 I've just released ctemplate 1.0! (I've decided 4 weeks is well
62 within the definition of "the next week or so"...)
63
64 A bit anti-climactic: there are no changes from ctemplate 1.0rc2.
65
66 === 29 July 2011 ===
67
68 I've just released ctemplate 1.0rc2. This fixes a serious bug where I
69 had added #includes in installed header files, that tried to include
70 non-installed header files. This means it was impossible to use
71 installed ctemplate; it only worked if you were using it from the
72 tarball directory.
73
74 I also fixed the unittest that was supposed to catch this, but didn't
75 (it was also building in the tarball directory).
76
77 If no further problems are found in the next week or so, I will
78 release ctemplate 1.0.
79
80 === 22 July 2011 ===
81
82 I've just released ctemplate 1.0rc1. If no problems are found in the
83 next week or two, I will release ctemplate 1.0.
84
85 ctemplate 1.0rc1 has relatively few changes from ctemplate 0.99.
86 xml-escaping has been improved a bit. A couple of bugs have been
87 fixed, including one where we were ignoring template-global sections
88 (a relatively new feature) in some places. A full list of changes is
89 available in the
90 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-1.0rc1/ChangeLog ChangeLog].
91
92 I've also changed the internal tools used to integrate
93 Google-supplied patches to ctemplate into the opensource release.
94 These new tools should result in more frequent updates with better
95 change descriptions. They will also result in future ChangeLog
96 entries being much more verbose (for better or for worse).
97
98 === 24 January 2011 ===
99
100 I've just released ctemplate 0.99. I expect this to be the last
101 release before ctemplate 1.0. Code has settled down; the big change
102 here is some efficiency improvements to javascript template escaping.
103 There is also a bugfix for an obscure case where ReloadAllIfChanged()
104 is used with multiple ctemplate search paths, where files are deleted
105 in one part of the search path between reloads. Unless you need
106 either of the above, there's no particular reason to upgrade.
107
108 A full list of changes is available in the
109 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-0.99/ChangeLog ChangeLog].
110
111 === 23 September 2010 ===
112
113 I've just released ctemplate 0.98. The changes are settling down as
114 we approach ctemplate 1.0 -- a few new default modifiers, a few
115 performance tweaks, a few portability improvements, but nothing
116 disruptive.
117
118 In my testing for this release, I noticed that the template regression
119 test (but not other template tests) would segfault on gcc 4.1.1 when
120 compiled with -O2. This seems pretty clearly to be a compiler bug; if
121 you need to use gcc 4.1.1 to compile ctemplate, you may wish to build
122 via `./configure CXXFLAGS="-O1 -g"` just to be safe.
123
124 === 20 April 2010 ===
125
126 I've just released ctemplate 0.97. This change consists primarily of
127 a significant change to the API: the addition of the `TemplateCache`
128 class, combined with deprecation of the `Template` class.
129
130 `TemplateCache` is a class that holds a collection of templates; this
131 concept always existed in ctemplate, but was not previously exposed.
132 Many static methods of the `Template` class, such as
133 `ReloadAllIfChanged()`, have become methods on `TemplateCache` instead
134 (the `Template` methods have been retained for backwards
135 compatibility.) Other methods, such as `Expand()`, have become free
136 functions. In fact, the entire `Template` class has been deprecated.
137
138 The deprecation of `Template` calls for changes in all clients of the
139 template code -- you can see in the example at the top of this page
140 how the code has changed from `Template* tpl =
141 ctemplate::Template::GetTemplate("example.tpl",
142 ctemplate::DO_NOT_STRIP); tpl->Expand(&output, &dict);` to
143 `ctemplate::ExpandTemplate("example.tpl", ctemplate::DO_NOT_STRIP,
144 &dict, &output);`. These changes will make the code simpler and more
145 thread-safe.
146
147 Old code should continue to work -- the `Template` class remains --
148 but new code should use the new API, and old code should transition as
149 convenient. One old API method is intrinsically thread-unsafe, and
150 should be prioritized to change: `tpl->ReloadIfChanged` should change
151 to `ctemplate::Template::ReloadAllIfChanged()`. Note this is a
152 semantic change: all templates are now reloaded, rather than just one.
153 However, since templates are reloaded lazily, and only if they've
154 changed on disk, I'm hopeful it will always be a reasonable change to
155 make.
156
157 To go along with these changes, the documentation has been almost
158 entirely revamped and made more accessible. Obscure ctemplate
159 features have been excised from the user's guide and moved into a
160 separate reference document. The new API is fully documented,
161 including new flexibility around reloading templates, made available
162 by the introduction of `TemplateCache`.
163
164 There are some more minor changes as well, such as the addition of
165 #include guards in the auto-generated .tpl.h files, to make it safe to
166 multiply-include them. I've also been continuing the portability
167 work: ctemplate should now work under Cygwin and MinGW. A full list
168 of changes is available in the
169 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-0.97/ChangeLog ChangeLog].
170
171 I know I've said this before, but I don't expect major API changes
172 before the 1.0 release. The most significant changes I expect to see
173 are the potential removal of some of the 'forwarding' methods in the
174 (deprecated) `Template` class.
175
176 === 12 June 2009 ===
177
178 I've just released ctemplate 0.95. This is entirely an API cleanup
179 release. Actually, relatively little of the API proper has changed:
180 `StringToTemplate` no longer takes an autoescape-context arg (instead
181 you specify this as part of the template-string, using the
182 `AUTOESCAPE` pragma). A few obsolete constructs have gone away, such
183 as the `TemplateFromString` class and
184 `TemplateDictionary::html_escape` and friends (just use the top-level
185 `html_escape`). See the
186 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-0.95/ChangeLog
187 ChangeLog] for a full list of these changes.
188
189 The biggest change is a renaming: the default namespace is now
190 `ctemplate` rather than `google`, and the include directory is
191 `ctemplate` rather than `google`. Other namespaces, such as
192 `template_modifiers`, have gone away.
193
194 All these changes will require you to modify your old code to get it
195 working with ctemplate 0.95. I've written a
196 [http://google-ctemplate.googlecode.com/svn/trunk/contrib/convert_to_95.pl
197 script] to help you do that. Please open an
198 [http://code.google.com/p/google-ctemplate/issues/list issue] if you
199 see a problem with the script. I've tested it, but not as widely as
200 I'd like. Also note the script will not be perfect for more complex
201 constructs, which you will have to clean up by hand.
202
203 I hope (expect) the API is now stable, and we won't see any more such
204 changes before ctemplate 1.0. I tried to isolate them all in this
205 release; except for the API changes, this release should behave
206 identically to ctemplate 0.94.
207
208 === 7 May 2009 ===
209
210 I've just released ctemplate 0.94. A few new features have been
211 added, such as the ability to expand a template into your own custom
212 `ExpandEmitter` instance, and the ability to hook the annotation
213 system (typically used for debugging). You can now remove strings
214 from the template cache in addition to adding them. Also, there
215 continues to be a trickle of new modifiers, in this case a modifier
216 for URL's in a CSS context.
217
218 However, the most invasive changes were made for speed reasons. The
219 biggest is that (almost) all `TemplateDictionary` allocations are now
220 done on the arena -- this includes allocations by the STL classes
221 inside the dictionary. This allows us to free all the memory at once,
222 rather than item by item, and has yielded a 3-4% speed improvement in
223 our tests. I've combined this with a `small_map` class that stores
224 items in a vector instead of a hash-map until we get to 3 or 4 items;
225 this gives another speed increase in the (common) case a template has
226 only a few sections or includes.
227
228 I also changed the hashing code to use
229 [http://murmurhash.googlepages.com/ MurmurHash] everywhere, rather
230 than the string hash function built into the STL library. This should
231 be faster.
232
233 All these changes should not be outwardly visible, but they do use
234 more advanced features of C++ than ctemplate has to date. This may
235 result in some problems compiling, or conceivably when running. If
236 you see any, please file an
237 [http://code.google.com/p/google-ctemplate/issues/list issue report].
238
239 You can see a full list of changes on the
240 [http://google-ctemplate.googlecode.com/svn/tags/ctemplate-0.94/ChangeLog
241 ChangeLog].
242
243 === 20 August 2008 ===
244
245 ctemplate 0.91 introduces the beginning of some API changes, as I look
246 to clean up the API in preparation for ctemplate 1.0. After 1.0, the
247 API will remain backwards compatible, but until that time, the API may
248 change. Please take a look at the
249 [http://google-ctemplate.googlecode.com/svn/trunk/ChangeLog ChangeLog]
250 to see if any of these changes affect you.
251
252 One change is the introduction of a new `PerExpandData` class, which
253 holds some state that was formerly in the `TemplateDictionary` class.
254 I'm still not sure if this class is a good idea, if it should be
255 separate from `TemplateDictionary` or a member, or what functionality
256 should move there (for instance, should `SetTemplateGlobal` move
257 there, since template-global variables are really, in some sense,
258 per-expand variables?) If you have any feedback, ideally based on
259 your own experience using the current API, feel free to post it at
260 `[email protected]`.
261
262 ctemplate also has several new features, including the addition of
263 "separator" sections, and the ability to change the markup character
264 (from `{{`). See the
265 [http://google-ctemplate.googlecode.com/svn/trunk/ChangeLog ChangeLog]
266 for a complete list, and the
267 [http://google-ctemplate.googlecode.com/svn/trunk/doc/howto.html howto
268 documentation] for more details on these new features.