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