Builds, runs, and tests succeed*

*Tests only succeed if you run them in a single-threaded instance. With
cargo this means invoking them as `cargo run -- --test-threads=1`. There
is an instance of global state in the Sword engine with the
VersificationMgr class that can easily cause a race condition. Since
VersificationMgr is intended to be a global singleton, when it is first
being instantiated the pointer is null. Sometimes the tests get into
that method at the same time and overwrite one another with the instance
of the manager, thus causing some of the VerseKeys that get instantiated
to be invalid.

TODO: On the Rust side of the code, create an instance of the
VersificationMgr before allowing any VerseKey objects to be created.
Probably also necessary to run it before allowing SWMgr to be
instantiated, as well, just to be safe.
This commit is contained in:
Greg Hellings
2025-06-26 02:19:26 -05:00
parent c8dd1ce0f0
commit 0ec0a0c7ac
8 changed files with 373 additions and 429 deletions
+1
View File
@@ -46,6 +46,7 @@
cargo
clippy
libgcc
lldb
rustc.llvm
rustc
rustfmt