]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/relnotes.txt
Released as 6.5.16.
[libucw.git] / ucw / doc / relnotes.txt
1 Release notes
2 =============
3
4 6.5 (2015-07-17)
5 ----------------
6 * Added companion library <<../ucw-json/index:,LibUCW-JSON>> for parsing
7   and formatting JSON.
8 * Fastbufs have a new wrapper for parsing and generating hex-dumps.
9   Useful primarily for debugging.
10 * Unicode functions are now more strict and they reject denormalized
11   UTF-8 sequences. Also, it is now possible to append UTF-8 characters
12   to a memory pool.
13 * The naming of memory pool functions mp_append_printf() and mp_append_vprintf()
14   turned out to be unfortunate as they have differently from all other functions
15   operating on growing buffers. They have been renamed to mp_printf_append()
16   and mp_vprintf_append() with the old names kept as aliases for backward
17   compatibility.
18
19 6.4 (2015-04-08)
20 ----------------
21 * Fixed several minor bugs in the <<mainloop:,mainloop>> module.
22
23 6.3 (2015-02-14)
24 ----------------
25 * Cleaned up and documented the <<../ucw-xml/index:,LibUCW-XML>> companion
26   library -- a lightning fast standards-complient XML parser.
27 * Solved problems with closing of stderr in daemons: see the new function
28   <<log:log_drop_stderr()>>.
29
30 6.2 (2015-01-16)
31 ----------------
32 * Fixed race conditions in <<daemon:,daemon helpers>>.
33 * The <<xtypes:,extended types>> have been documented and integrated
34   in the table printer, command-line option parser, and configuration parser.
35 * The <<ucw-tableprinter.5:,table printer options>> have been documented.
36
37 6.1 (2014-08-09)
38 ----------------
39
40 Incompatible changes
41 ~~~~~~~~~~~~~~~~~~~~
42 * Major changes of the table printer module. Finally, its interface can be
43   considered stable now.
44
45 Minor changes
46 ~~~~~~~~~~~~~
47 * The <<opt:,command-line option parser>> gained `OPT_BREAK` class and
48   `OPT_HELP_COLUMNS` flag.
49 * The strtonum module supports more types.
50
51 6.0 (2014-06-20)
52 ----------------
53
54 Incompatible changes
55 ~~~~~~~~~~~~~~~~~~~~
56 * *Incompatible:* It turned out that almost all users of the <<gary:,growing array>>
57   module push/pop individual elements. Therefore, we have removed the second
58   argument (item count) of `GARY_PUSH` and `GARY_POP`. If you want to push/pop
59   multiple elements at once, use `GARY_PUSH_MULTI` and `GARY_POP_MULTI`.
60 * *Incompatible:* The interface of the <<heap:,heap>> module was cleaned up
61   to remove non-systematic side-effects. The `HEAP_INSERT` operation is now
62   a proper insert (previously, it was just cleanup after insertion performed
63   by the caller), similarly `HEAP_INCREASE` and `HEAP_DECREASE`. The `HEAP_DELMIN`
64   operation was renamed to `HEAP_DELETE_MIN`. New operations `HEAP_REPLACE` and
65   `HEAP_REPLACE_MIN` have been added. If you need to track positions of elements
66   in the heap, please check the notes at individual functions.
67 * The <<conf:,configuration file parser>> has been improved:
68 ** Multiple instances of the configuration parser are supported.
69 ** *Incompatible:* As there may be more instances, we can no longer use
70    global variables to control the configuration system. In particular,
71    `cf_need_journal` and `cf_pool` variables have been replaced by
72    functions <<conf:cf_set_journalling()>> and <<conf:cf_get_pool()>>.
73 ** *Incompatible:* Loading of configuration files has been decoupled from
74    the getopt wrapper, so you might need to include `conf.h` for functions
75    which were previously declared in `getopt.h`.
76 ** New functions have been added:
77    <<conf:cf_open_group()>>, <<conf:cf_close_group()>>, and <<conf:cf_revert()>>.
78 ** *Incompatible:* Dynamic configuration arrays have been re-implemented in
79    terms of our generic <<gary:,growing arrays>>. This makes them easier to
80    use and most of the interface has been preserved. The only exception is
81    static allocation via the DARY_ALLOC() macro, which is no longer available.
82 * *Incompatible:* The `UCW::CGI` Perl module has its custom error handlers
83   (which override default Perl error handlers) split off to a separate module
84   `UCW::CGI::ErrorHandler`.
85
86 New modules
87 ~~~~~~~~~~~
88 * <<daemon:,Daemon helpers>> have been added including a new `daemon-control`
89   utility. The old `daemon-helper` utility has been obsoleted and it is not
90   compiled by default.
91 * <<signal:,Signal helpers>> for translation between signal names and numbers
92   have been added.
93 * The fastbuf I/O layer received a new back-end <<fastbuf:fbmulti,fb_multi>>,
94   which concatenates several fastbuf streams to form a single virtual stream.
95 * Added <<varint:,varint>> module for efficient UTF-8-like encoding of 64-bit
96   integers to byte sequences.
97 * Added <<table:,table printer>> module for configurable formatting of
98   2-dimensional tables in both user-friendly and machine-friendly ways.
99 * A <<opt:,parser of command-line options>> has been added, similar in spirit to
100   our <<conf:,configuration file parser>>. The <<conf:getopt_h,getopt>> module
101   has been obsoleted
102 * <<alloc:,Generic allocators>> have been introduced, providing an abstract
103   way of memory allocation. <<gary:,Growing arrays>> are now based on such
104   allocators, which allows for example growing arrays in memory pools.
105
106 Cleanups
107 ~~~~~~~~
108 * Libucw finally has a clean ABI, which does not pollute namespace, risking
109   collisions with other libraries. However, we did not want to abandon our
110   nicely and simply named functions, so the header files define macros,
111   which translate names of all externally visible symbols to start with `ucw_`.
112   If you don't like this, configure libucw with `CONFIG_UCW_CLEAN_ABI` turned off.
113 * All helper utilities are now installed with names starting with `ucw-` to
114   prevent collisions.
115 * The auxiliary libraries have been renamed to `libucw-charset`, `libucw-images`,
116   `libucw-xml`. The clean ABI promise does not extend to them yet.
117 * The alias `uns` for `unsigned int` has been replaced by a more common `uint`.
118   The old name is still maintained for backward compatibility.
119 * Several functions now accept `size_t` instead of `unsigned int` for size arguments.
120
121 Minor changes
122 ~~~~~~~~~~~~~
123 * `<stdbool.h>` is automatically included by `<ucw/lib.h>`.
124
125 5.0 (2012-02-21)
126 ----------------
127
128 * *Incompatible:* The `timestamp_t` type has been decoupled from wall clock time.
129   It now specifies the number of milliseconds from an unspecified origin, so that
130   it can for example refer to the system monotonic clock. The `ucw_time_t` type
131   has been removed.
132
133 * The <<mainloop:,mainloop>> module has been rewritten:
134 ** Multiple instances of the main loop are supported (to be used in different
135    threads or locally within a library function).
136 ** The new implementation is more efficient: it uses heaps for timers,
137    epoll() for file descriptors (when available).
138 ** The return value of <<mainloop:struct_main_file,`main_file`>> handlers has been
139    changed to <<mainloop:enum_main_hook_return,`HOOK_IDLE`>> and <<mainloop:enum_main_hook_return,`HOOK_RETRY`>>.
140    However, the numerical values are equal, so old code should keep working.
141 ** *Incompatible:* The main loop time (`main_now`) has been decoupled from wall clock time
142    and moved to a field in the `main_context` structure. It can be accessed either directly
143    or via <<mainloop:main_get_now()>>. The `main_now_seconds` variable has
144    been removed, `main_idle_time` has become a structure field.
145 ** *Incompatible:* The interface for asynchronous reading and writing
146    (file_read() and friends) has been separated from the core of the main loop.
147    Use <<mainloop:struct_main_block_io,`struct main_block_io`>> and related functions instead.
148 ** *Incompatible:* file_close_all() is gone. You have to call <<mainloop:main_teardown()>>
149    or <<mainloop:main_destroy()>> to clean up properly after fork().
150 ** Added support for <<mainloop:signal,synchronous delivery of signals>>.
151 ** Added relative timers: <<mainloop:timer_add_rel()>>.
152 ** Modification of events from a running event handler is always safe.
153 ** Deleting an already deleted event is always safe.
154 ** For any event type, it is possible to ask whether it is active (added to the mainloop) or not: <<mainloop:hook_is_active()>> and friends.
155 ** A new mainloop front-end for asynchronous <<mainloop:recordio,record-based I/O>> has been added.
156
157 * Added support for <<trans:,resource pools and transactions>>, which is a general
158   mechanism for tracking resources and reporting errors. It is still considered
159   experimental, so the API can change in future releases.
160
161 * Added a <<gary:,growing array>> module `gary.h`, similar to `gbuf.h`, but with
162   a much more convenient interface.
163
164 * The <<lists:,Circular linked lists>> can recognize unlinked nodes,
165   see <<lists:clist_unlink()>>.
166
167 * Added `strtonum.h` -- a module for precise parsing of numbers.
168
169 * When compiled by a recent enough GCC, `__thread` is used for thread-local variables,
170   which is more efficient than the POSIX per-thread storage.
171 ** *Incompatible:* `ucwlib_context->thread_id` is no longer available directly,
172   please use <<thread:ucwlib_thread_id()>> instead.
173
174 * *Incompatible:* Several modules have been declared obsolete and removed:
175 ** `sighandler` -- generic signal handling (it still exists internally)
176 ** `qache` -- a mmap-based shared cache
177 ** `prefetch` -- an interface to memory prefetch instructions; superseded by GCC `__builtin_prefetch`
178 ** `randomkey` -- a generator of cryptographically strong pseudo-random tokens; will be replaced
179    by something more generic soon
180 ** `profile` -- a profiling hack
181
182 * *Incompatible:* Several modules now have their own header files:
183 ** `process.h` -- all functions related to processes, previously declared in `lib.h`
184 ** `io.h` -- functions related to files from `lib.h` and `lfs.h`
185 ** `time.h` -- timestamps and interval timers, previously in `lib.h`
186
187 * *Incompatible:* Several configuration options were renamed or removed:
188 ** `CONFIG_FAKE_ELTPOOL` &rarr; `CONFIG_UCW_FAKE_ELTPOOL`
189 ** `CONFIG_LARGE_FILES` &rarr; `CONFIG_UCW_LARGE_FILES`
190 ** `CONFIG_OWN_GETOPT` &rarr; `CONFIG_UCW_OWN_GETOPT`
191 ** `CONFIG_DIRECT_IO` &rarr; `CONFIG_UCW_DIRECT_IO`
192 ** `DEFAULT_CONFIG` &rarr; `CONFIG_UCW_DEFAULT_CONFIG`
193 ** `ENV_VAR_CONFIG` &rarr; `CONFIG_UCW_ENV_VAR_CONFIG`
194 ** `CONFIG_LFS` was removed
195 ** `CONFIG_URL_ESCAPE_COMPAT` was removed
196
197 * `UCW::Configure` supports running of test programs.
198
199 * `UCW::CGI` support multiple argument tables and UTF-8 mode. Also, it uses the
200   proper HTTP status codes when reporting errors.
201
202 * Implementation details of <<fastbuf:,fastbufs>> have changed. The new code checks
203   invariants more carefully, so it is possible that custom fastbuf back-ends which
204   are buggy now fail, although they previously seemed to work.
205
206
207 4.0 (2009-04-13)
208 ----------------
209 This was the first stand-alone release of LibUCW. Before that, LibUCW was developed
210 as a part of the http://www.ucw.cz/holmes/[Sherlock Holmes project].