tag:github.com,2008:https://github.com/SolidWallOfCode/libswoc/releasesRelease notes from libswoc2023-12-18T15:24:46Ztag:github.com,2008:Repository/148709807/1.5.92023-12-18T17:52:12ZC++mas Edition<p>Just in time for the holidays, a new release of libSWOC! This is a bit bigger than other recent point releases due to increased integration in ATS.</p>
<ul>
<li>Fixed possible overflow bug in <code>svtoi</code>.</li>
<li>IP networking support
<ul>
<li>Generalization of network category (multicast, private, etc.).</li>
<li>Better endian handling.</li>
<li>Added some missing / unimplemented methods.</li>
</ul>
</li>
<li>Errata: Auto text support for error codes in constructor and <code>note</code> method.</li>
<li>MemArena - support <code>discard</code> allocated spans.</li>
</ul>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.82023-11-28T19:57:09ZPerpetual Change<p>Minor tweaks</p>
<ul>
<li><code>Errata</code> now supports more constructors along with "AUTO" text generation based on the error code and severity.</li>
<li><code>Errata::is_ok</code> fix (false positives if no messages but severity).</li>
<li>IPAddr - added <code>const</code> to certain methods.</li>
<li>Improved clang formatting, more Traffic Server compliant.</li>
<li>Added <code>let</code> to meta utilities. This enables changing the value of variables in a scope.</li>
</ul>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.72023-11-15T23:06:59ZClanging gong<ul>
<li>IPSpace - fix compiler issue with <code>auto && [ r, p ] = *space.find(addr)</code> type constructs.</li>
<li>Fix CMake hard coded install directory.</li>
<li>Update clang format to ATS 10, update related tools, apply.</li>
<li><code>swoc::file</code> construct from string.</li>
<li>Better hashing for IP addresses.</li>
</ul>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.62023-11-15T01:40:10Z1.5.6<p>CMake: Only set install directory if not already set.</p>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.52023-09-22T18:22:56ZIP man<p>Primarily a bug fix release.</p>
<ul>
<li>Port access from <code>IPEndpoint</code> was too fragile, throwing an exception in situations it shouldn't.</li>
<li>When iterating over IPSpace instances with both IPv4 and IPv6 addresses, the latter would be badly formatted.</li>
</ul>
<p>For convenience, <code>IntrusiveDList</code> was extended to support list operations (e.g., appending one list to another).</p>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.42023-08-07T15:10:45ZLeif Storm<p>Minor ATS compatibility release.</p>
<ul>
<li>Added <code>UnHex</code> wrapper for BWF to convert hexadecimal strings to raw byte buffers (conversion the other way is already supported).</li>
<li>Better <code>std:error_code</code> handlin.</li>
</ul>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.32023-07-25T20:58:00ZSpanning the Void<p>More minor tweaks for ATS support.</p>
<ul>
<li>IP - better handling of <code>sockaddr</code> types.</li>
<li>MemSpan - better construction for stricter <code>const</code> correctness.</li>
<li>MemSpan - handle literal strings better by excluding the terminal nul character by default.</li>
<li>MemSpan - related to above, handle C arrays better.</li>
<li>MemSpan - add <code>restrict</code> method to optionally shorten the view (change to minimum of current size, restrict value).</li>
<li>BWF - remove direct support for C strings - depend on MemSpan instead.</li>
</ul>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.22023-07-13T16:54:14ZThe Home Front<p>A small release for better ATS compatibility as work on replacing legacy code with libswoc continues.</p>
<ul>
<li>More size based constructors for <code>TextView</code> to allowing using various integral types without casting.</li>
<li><code>BufferWriter</code>
<ul>
<li>Support passing an instance for printing. Internally this convers it to a view and prints that, but it's an idiom used in ATS.</li>
<li>Generic memory changed to <code>MemSpan<const void></code> for less casting and amibiguity.</li>
</ul>
</li>
</ul>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.12023-06-15T18:26:43ZMask of Zorro<p>Emergency release to fix a bug in the handling of certain edge cases between IP address classes and <code>IPMask</code>.</p>SolidWallOfCodetag:github.com,2008:Repository/148709807/1.5.02023-06-12T15:37:58ZHawaii<p>A consolidation release. There are a few backward incompatibilities but these are easily fixed. Fundamentally there was an issue in how temporaries for <code>IPSpace</code> were handled when using tuple style support which were not possible to fix without breaking compatibility - correctness over convenience. There are many fixes to documentation comments and a number of additional convenience methods, along with as always more testing.</p>
<ul>
<li><code>IPSpace</code> supports tuple style access to iterator values but internally this is now a structure because the tuple implementation could not be made to work correctly with strong optimization. This is compatible except in certain cases noted below.</li>
<li>Some of the <code>is_valid</code> methods methods for "container" classes were changed to <code>empty</code> and inverted. Locally this is irrelevant but using <code>empty</code> to check for container validity is the common style for STL so this changes makes using the IP network support easier.</li>
<li>A new class <code>IPRangeView</code> which is a view to an IP address range. This is used to minimize copying when the actual stored data is family specific but external consumers want the generic wrapper. Previously this required a copy. The view class contains family specific pointers internally and forwards generic access to family specific access.</li>
</ul>
<p>libswoc can now be built in github which means better checking for branches.</p>
<p>libswoc is now a Coverity covered project. The initial check against 1.5.0 yielded no problems although there were two false positives. The latter are complaints about calling <code>stat</code> before <code>unlink</code> and <code>opendir</code> as if not doing that was safer. I explicitly disagree.</p>
<p>Compatibility notes:</p>
<ul>
<li><code>lower_bound</code> and <code>upper_bound</code> were changed to <code>min</code>, <code>max</code> respectively for consistency.</li>
<li><code>is_valid</code> was changed in some cases to <code>empty</code> for consistency.</li>
<li>R-value reference in structured binding is no longer support for temporary iterators. E.g.
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (auto && [ r, p ] = *space.find(addr) ; ! r.empty()) {"><pre class="notranslate"><code>if (auto && [ r, p ] = *space.find(addr) ; ! r.empty()) {
</code></pre></div>
Although this mostly worked, in some cases it could create dangling references because the range was stored in the iterator. The range msut be a synthesized value because the internals store only family specific types. The fix is to use
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (auto [ r, p ] = *space.find(addr) ; ! r.empty()) {"><pre class="notranslate"><code>if (auto [ r, p ] = *space.find(addr) ; ! r.empty()) {
</code></pre></div>
The new class <code>IPRangeView</code> was created to support this style with minimal copying.</li>
</ul>SolidWallOfCode