Reducing Internal Dependencies
The first part of the month month has been focused on continuing breaking internal dependencies between libraries.
The goal is for Sane C++ Libraries to be a collection of libraries that work well together, rather than a monolithic framework. Users should be able to use a single library in isolation without being forced to adopt the entire ecosystem.
Plugin, FileSystemWatcher, Async and Http libraries have seen their dependencies reduced, and the resulting dependencies graph is now starting to look a lot nicer!
Detailed list of commits:
- Plugin: Refactoring to isolate FileSystemIterator usage
 - Plugin: Remove Plugin dependency on FileSystem
 - Plugin: Remove Plugin dependency on FileSystemIterator
 - Plugin: Remove Plugin dependency on Time
 - FileSystemWatcher: Remove dependency on Threading
 - Http: Remove Http dependency on Strings
 - Async: Remove dependency on Time
 
Bring Your Own Containers
A new example called InteropSTL has been added to show how to use std::string and std::vector<char> with some Sane C++ Libraries.
You don't need to use the STL containers, this is only showing that you can absolutely Bring Your Own Containers (including strings) if for whatever reason one is not interested in using String and Vector<> variations already included in the project.  
Some details about how how this works: as a consequence of the dependencies reduction, in the past months a new virtual interface has been introduced (named IGrowableBuffer) abstracting strings and writable byte buffers, allowing for all libraries not to depend on the Strings or Memory libraries.
This month one more step has been done, by further optimizing it so that the only virtual function call is done when physically requiring an allocation if the available growable buffer capacity is insufficient.
Callers can always avoid this indirect function call by properly sizing the buffer before using some library.
Previously a second virtual call was always done in the IGrowableBuffer destructor, but now this has been optimized.
As the number of potential virtual methods has become just one, the interface has been changed from a virtual one into a regular plain struct with a function pointer, reducing the additional indirection required by the C++ vtable dereferencing!  
So now it's up to you to bring your own containers!!
Detailed list of commits:
- Everywhere: De-virtualize IGrowableBuffer destruction
 - Strings: Obtain encoding from GrowableBuffer
in StringBuilder  - InteropSTL: Show std::string and std::vector
usage with File and FileSystem libraries  - InteropSTL: Show std::string and std::vector
usage with Strings library  
Tools new bootstrap
SC::Tools are self contained single C++ source files that are (automatically) compiled on the fly and linked to Sane C++ to be immediately executed.
The mechanism used to compile them was historically involving both Make on Posix and NMake on Windows to rebuild SC.cpp library and the SC-${TOOL_NAME}.cpp script separately, link them and also to rebuild them only when some of their dependencies change.
Both Make and NMake have now been replaced by a native ToolsBootstrap.cpp that doesn't use any of the project's libraries.
The new bootstrap does the same work as Make but hardcoded on compiling the SC.cpp plus the SC-${TOOL_NAME}.cpp on Posix/Windows.  
Detailed list of commits:
- Tools: Add ToolsBootstrap to get rid of the Makefiles
 - Tools: Fix time tracking for compiling Tools on older macOS
 - Tools: Fix time tracking for compiling Tools on Windows
 - Tools: Improve ToolsBootstrap code clarity
 - Tools: Print how much time is being spent compiling a Tool on Windows
 - Tools: Print how much time is being spent compiling a Tool
 - Tools: Support folder with spaces and unicode code points in ToolsBootstrap
 
Build
The SC::Build is a tool implementing a build system generator where builds are imperatively described in C++.
This month it gets:
- switches to change the C++ standard used by projects
 - some fixes for enabling exceptions on VS Projects
 - makefiles avoiding to use the (quite dangerous) 
rm -rfto remove intermediates and output directory as that was incompatible with building multiple projects in the same output folder. - Also now custom arguments can be passed when using the run verb so for example, parsed after the first 
--appended to the commandline 
./SC.sh build run SCTest Debug -- --arg1 --arg2
The above invokes the SCTest executable, as built by the SCTest project with the --arg1 and --arg2 arguments.
Detailed list of commits:
- Build: Add support to switch the C++ standard
 - Build: Fix enabling Exception handling on Visual Studio projects
 - Build: Only remove generated files in the 'clean' Makefile target
 - Build: Support passing custom arguments when using the run verb
 
Test Coverage
Test coverage has been going down a little bit over the course of the past months, so a few commits have been done with the specific target of bringing it back in the ~85% range.
Detailed list of commits:
- Everywhere: Increase test coverage
 - Process: Increase test coverage
 - AsyncStreams: Increase test coverage
 
CI
CI was suffering from some flakiness on FileSystemWatcher macOS tests.
I suspect this has to do with how github is handling macOS VM as tests never fail locally but anyway, they are less flaky now.
Also the new InteropSTL is now compiled on all supported platforms to make sure it doesn't regress.
Detailed list of commits:
- CI: Build with Xcode on macOS in Release configurations
 - CI: Compile and test InteropSTL on all platforms
 - CI: Extend windows runners timeout
 - FileSystemWatcherAsync: Reduce test flakiness on macOS (2nd attempt)
 - FileSystemWatcherAsync: Reduce test flakiness on macOS
 
Miscellaneous
And as always a bunch of fixes and minor additions throughout all libraries that are not sizable enough to have their own section in the blog post!
One thing to note is that the ContainersSerialization library has been renamed to ContainersReflection as it was depending on Containers and Reflection libraries.
I want to thank Francesco (cozis) Cozzuto for reporting on Discord a couple of issues he has been finding with Valgrind!
Detailed list of commits:
- Async: Preserve timeouts scheduling order and clamp their expiration time
 - AsyncStreams: Refcount ZLibAPI
 - ContainersReflection: Rename ContainersSerialization to ContainersReflection
 - Everywhere: Use wide characters versions of the FILE macro
 - Foundation: Fully qualify SC::forward to avoid confusion with std::forward
 - Process: Do not close Process::handle like a file descriptor
 - SCExample: Fix printing plugin names on Windows
 - Socket: Fix Socket test including IPV6 option for localhost
 - Socket: Make SocketIPAddress::isValid() return false for invalid socket addresses
 - Strings: Add Console::flush
 - Strings: Make StringView::operator== accept a StringView
 - Strings: Remove consecutive path separators in Path::normalize
 - Testing: Flush every printed line
 - Testing: Get rid of the trailing 0 when printing red/green emoji