Releases: GregUtas/robust-services-core
20220920a
"Remember, Grasshopper, software is never complete. It is only released."
- Make the configuration file an optional command line parameter (
c=<path>). - Change the
Moduleconstructor so that an optional module can define a symbol that allows it to be enabled. - Define an
OptionalModulesconfiguration parameter (a string) that specifies the optional modules to enable. - Enable optional modules at the bottom of
NbModule::Startup. - Change
CreateModulesin main.cpp and rscapp.cpp to use the optional modules capability.
⚠️ WarningA module that is not required by another one must define a symbol when it invokes the base
Moduleconstructor, and that symbol must appear in theOptionalModulesparameter in the configuration file. Each module must also override theEnablefunction to enable the modules that it requires, plus itself (Module::Enable). Instantiating a module is no longer sufficient to make its capabilities available; it must also be enabled for itsStartupfunction to be invoked during initialization and restarts. See the comments in Module.h.
- Convert each
fn_namefunction in a template header to aninline fn_name(a C++17 capability). - Enhance the static analysis tool to support
inlinedata. - Change how Diplomacy bot events and reconnect attempts are implemented.
- Rename
RscLaunchertoLauncher.
20220726a
CodeTools
- Add a
WarningAttrs.disabled_bool so that all occurrences of a warning can be disabled. - Don't automatically replace tabs with spaces after editing a file.
- Remove line counts from the file produced by
>checkand add a>linecountscommand to export them.
20220721a
NodeBase
- Create src/exe directory for launching executables.
- Move
RecoveryThreadto its own files.
CodeTools
- Checks removed from
Editorand made before loggingFunctionCouldBeFreewere forgotten forDataCouldBeFree. - Fix bugs when deleting C++ items.
- Automatically preserve warnings generated during compilation if
>checkis re-executed.
Other
- Update documents and add an installation guide.
20220714a
NodeBase
- Fix bug: exit the program instead of getting into an infinite restart loop if a trap occurs during initialization.
- Remove Lock.h:
Mutexis almost as efficient and much better for robustness and debugging. - Reduce object pool alarm thresholds to less than 1/16th, 1/32nd, and 1/64th of the pool's blocks being available.
- Fix bug:
SlabPriv::Validateshould only validate the block ataddr, instead of the entire heap, whenaddr != nullptr. - Increase the restart timeout to 20 seconds.
- Change element.config so that each object pool starts at the default size of 1K blocks.
CodeTools
- Add a warning for a trailing comment that is not vertically aligned with one above it.
- Add a warning for an
autovariable that should be taggedconst. - Don't log
FunctionCouldBeFreewhen checks inEditorprevented>fixfrom actually changing the function. - Fix bug: when a class has a function with the same name as one made
staticin a .cpp, the class must qualify thestaticfunction with its namespace to invoke it. - Fix bug: an item changed to
staticin a .cpp was relocated to within a class definition.
20220702a
NodeBase
- Create a src/app directory as an alternative to modifying main.cpp when building an application with RSC.
- Move some main.cpp code to
LogandMainArgsto share code with rscapp.cpp. - Look for the input and help directories in the directory immediately above the src directory on the path to the executable.
- Use
EXIT_SUCCESSandEXIT_FAILUREfor exit codes.
CodeTools
- Add an option to
>exportto dump all code comments to a file. - Use the new
>exportoption to extract comments, and then use MS Word to find and fix typos. - Don't log "could be const" on data or an argument whose type has two pointers/arrays or more.
20220629a
NodeBase
- Implement
SIGWRITEon Linux. - Change
Thread.Interruptto require a reason for the interrupt. - Count the number of times a
Mutexcauses blocking. - Fix bug: spurious wakeups occur in
Gate.WaitFor. - Fix bug: divide by zero safety net test fails on clang.
- Fix bug: flood of stack trace requests during restarts causes heap corruption.
CodeTools
- Support elaborated type specifiers.
- Check that a subsequent invocation of
>parseis specifying the same target.
20220619a
NodeBase
- Support logging early during booting, before the log system has initialized.
- If initialization is being traced, stop tracing soon after the system has booted.
CodeTools
- Don't import the launcher directory in the script lib.create:
RscLauncheralso has amain(), which causes spurious warnings about removing#includesfromrsc/main.cpp. - Log a warning when an
autovariable could be inadvertently copying an object, which would be avoided by declaring it asauto&. - Fix some warnings where an
autovariable was copying an object. - Fix bug: when
>fixadds a special member function to a template,FindTemplateAnalogcauses an "invalid vector subscript" exception because template instances don't have that member.
Other
- Get
RscLauncherworking on Linux. This uncovered a VS2022 bug: hitting the enter key in the Linux Console Window, without any other input, does not causestd::getlineto return with an empty string. A space must be entered first. - Fix some gcc and clang compiler warnings.
20220613a
- Add a document that provides the status of trap recovery tests.
- Rename
SysFile→FileSystem,SysLock→Lock, andSysMutex→Mutex. - Track whether a conflict has occurred on a
Mutex. - Implement
SysThread::SetPriorityAllowedto indicate whether scheduler priorities can be changed. If they can't, increase the timeslice for a locked thread if a preemptable thread is also running. - Add the virtual function
Base::Summarizefor displaying items in a tabular format. - Modify the following CLI commands and the classes that they display to support
Summarize:NbIncrement:>alarms list>buffers>daemons list>deferred>heaps list>modules>mutexes>pools>psignals>threads>toolsNwIncrement:>ipports>ipservicesSbIncrement:>contexts>events>factories>handlers>initiators>invpools>messages>msgports>parameters>protocols>psms>services>signals>ssms>states>timers>triggers
20220607a
The focus was on testing the Linux target, which now seems stable.
NodeBase
- Implement
SysFile.GetLinefor erasing the\rfrom endlines in files created on Windows but read on Linux. - Rename
SysThreadStacktoSysStackTrace. - Implement
SysStackTrace.Demangletargets for Linux and Windows. - Implement
SysThread.Pauseso a thread can sleep while waiting for itsThreadto finish construction. - Implement
InitThread.RunningTicksas a rough monotonic clock that doesn't advance during restarts and breakpoints. - Exit a thread if it has run for ~1 second and its
Threadstill isn't finished construction. - Implement
SlabHeap.Validate. - If
RootThreadwill not initiate a restart on a scheduling timeout, limit it to one log every 3 seconds. - Fix bug: create
ThreadRegistrybeforeRootThreadand add some missing mutexes when accessing itsthreads_member. - Fix bug: if the platform quickly reused a native thread identifier, the new thread with that identifier failed to start because its identifier was still registered as deleted in
ThreadRegistry.threads_. - Fix bug: don't invoke
Destroyon aThreadthat is markeddeleting_.
NetworkBase
- Deleting a socket does not unblock
recvfromon Linux, so have aUdpIoThreadsend itself a message to unblock when it wants to exit during a restart.
CodeTools
- Remove the
SourcePathdirectory from the file paths in>checkoutput and change\separators to/: this eliminates noise in diffs when a>checkobtained on Windows is compared with one obtained on Linux. - Fix bug: when a name refers to a function, its interim referent wasn't updated after argument matching selected the correct function.
- Fix bug: when setting an interim referent, prefer a non-static function to a static one: this adds an implicit
thisargument to the function call, which is needed to match with a non-static function, but which is ignored when matching with a static function.
Known deficiencies
-
The following recovery tests fail on Linux:
- invoking
std::terminate(currently a problem in Windows release builds as well) - trapping while handling an exception
- trapping in a destructor
- Ctrl-C to interrupt a thread
The first three are because of the gcc compiler. The last one appears to be because WSL doesn't pass a Ctrl-C to the Linux console.
- invoking
-
There are minor differences between
>checkand>exportresults obtained on Windows as opposed to Linux. -
RscLauncherstill hasn't been tested on Linux.
20220601a
NodeBase
- Implement Linux target for
RscLauncher. Closes #20. - Fix bug:
>restart rebootand>restart exitfailed becauseexit()invokes destructors, which eventually caused problems whenDebug::ftwas invoked.
CodeTools
- Fix bug: the keyword
virtualshould always be removed on an override. - Fix bug: the
overridetag could only be added after thevirtualkeyword was present so that it could be deleted. - Fix bug: warnings about
virtualandoverrideare detected during the compilation phase and were not preserved when the file was checked.
Known deficiencies
- Linux targets have not yet been tested.
- Windows bug that causes a stack overflow when trying to recover from
std::terminatein a release build has been reported.