Releases: anth64/stk
v1.0.0-pre.12
Fixed
gmake.mk: change static library extension on Windows from.libto.afor MinGW- module_loader: use
RTLD_GLOBALwhen loading modules to expose host symbols
Full Changelog: v1.0.0-pre.11...v1.0.0-pre.12
v1.0.0-pre.11
Fixed
gmake.mk:PREFIXnow defaults to/usron Linux instead of/usr/local
Full Changelog: v1.0.0-pre.10...v1.0.0-pre.11
v1.0.0-pre.10
Fixed
bmake.mk: all target and object paths now anchored with${.CURDIR}to fix incorrect path nesting when building from outside the project root; substitution delimiters switched to|to avoid conflicts with path separators; compile rules now emit-MT/-MFfor correct dependency file targeting; removed stale.-includedirectives for.dfiles; release lib rules now use${.TARGET}consistentlygmake.mk: removedAR/ARFLAGS_STATICvariables and theifeq-guarded static lib rules; both debug and release static lib rules now usear rcsdirectly, as MinGW shipsarandlib.exewas incorrect
Full Changelog: v1.0.0-pre.9...v1.0.0-pre.10
v1.0.0-pre.9
Changed
debugandreleasetargets now produce both a shared and static library alongside each other- obj directories split into
shared/andstatic/subdirs to keep-fPICobjects isolated installno longer depends onrelease; guards with an existence check and exits with a clear message if artifacts are missinguninstallremoves static lib alongside shared libbuild.sh:installanduninstallnow handle privilege escalation automatically viadoasorsudo; skips escalation if already root- updated Windows installation instructions to clarify
stk.dllvsstk.libdepending on link type
Full Changelog: v1.0.0-pre.8...v1.0.0-pre.9
v1.0.0-pre.8
What's Changed
- stk_poll: new modules were loaded into stale pre-compaction slot indices when simultaneous load and unload events occurred in the same poll cycle. The two load loops have been unified into one that always appends to the compacted array.
- stk_poll:
cascade_indiceswas a fixed 256-slot stack array with no bounds check. Now heap-allocated tomodule_countentries per iteration. - stk_pending_retry: module array was pre-allocated to
module_count + stk_pending_countbut never shrunk when fewer entries loaded than were pending. Now trimmed to actual count after the retry loop. - stk_collect_dependents: no bounds guard before writing to the
indicesbuffer. Addedcapacityparameter and an explicit check before every write. - stk_log_modules:
%luwithsize_tis UB on 64-bit MSVC whereunsigned longis 32-bit. Fixed with an explicit(unsigned long)cast.
Full Changelog: v1.0.0-pre.7...v1.0.0-pre.8
v1.0.0-pre.7
What's Changed
- Added missing dependency failure logging to stk_module_load(). This ensures that when a module is deferred to the pending queue, the specific unmet requirements are reported to the log.
Full Changelog: v1.0.0-pre.6...v1.0.0-pre.7
v1.0.0-pre.6
Completes the pending queue batching work started in pre.4. stk_poll() now collects all deferred paths from the load holes and append_modules loops into a single buffer and flushes them with one stk_pending_add_batch() call, consistent with how the unload, cascade, and init loops were already handled.
Full Changelog: v1.0.0-pre.5...v1.0.0-pre.6
v1.0.0-pre.5
What's Changed
Performance
- Replaced per-module
stk_pending_add()calls instk_initdeferred
module loop with batch collection and a singlestk_pending_add_batch()
call after.
Full Changelog: v1.0.0-pre.4...v1.0.0-pre.5
v1.0.0-pre.4
What's Changed
Performance
- Replaced per-module
realloccalls instk_pending_retrywith a single bulk allocation upfront - Replaced per-module
stk_pending_addcalls instk_pollunload and cascade loops withstk_pending_add_batch
Full Changelog: v1.0.0-pre.3...v1.0.0-pre.4
v1.0.0-pre.3
This release introduces a major overhaul of dependency resolution, including transitive "cascade" unloads, a generic topological sort implementation, and granular failure logging.
Core Architecture Changes
Dependency Graph & Topological Sorting
- Generic Kahn's Sort: Refactored the topological sort into
stk_kahn_sort(). It now acceptshas_depandon_cyclecallbacks, decoupling the core algorithm from thestk_modulesstructure. - Batch Load Ordering:
stk_sort_load_order()now usesstk_batch_has_depto inspect temporary files. This allows simultaneous load events to be processed in dependency-first order without requiring a retry cycle. - Transitive Unloads (Cascade): On
UNLOADevents,stk_poll()now expands the target set viastk_collect_dependents()to include all transitively dependent modules. - Unload Ordering: Added
stk_sort_unload_order()to ensure that dependents are always shut down before their dependencies (reverse topological order).
Module Lifecycle Refactor
- Phased Loading:
stk_module_load()has been decomposed intostk_module_preload(),stk_module_activate(),stk_module_discard(), andstk_validate_dependencies_single(). - Activation Guard: Module
initis no longer called if dependencies are unmet during the validation phase. - Pending Queue Persistence: Modules with unmet dependencies are now added to the pending queue instead of being dropped.
stk_pending_retry()now prunes entries for files that no longer exist and skips already-loaded entries.
Logging & Diagnostics
- Granular Failure Reporting: Replaced vague "unmet dependencies" logs with
stk_log_dependency_failures(). - Error Context: Logs now specify the exact reason for a dependency failure:
not found: Missing dependency ID.requires <constraint>, have <version>: Version mismatch.
- Buffer Configuration: Added
STK_MOD_DEP_LOG_BUFFER(2048) tostk.hto define the failure message buffer size.
Technical Changelog
Added
STK_MOD_DEP_LOG_BUFFERconstant instk.h.stk_kahn_sortgeneric callback-based implementation.stk_log_dependency_failuresfor detailed mismatch reporting.stk_collect_dependentsfor transitive dependency tracking.
Changed
stk_module_loadlogic split into discrete preload, validate, activate, and discard steps.stk_pollevent loop updated to support cascade unloads and improved retry paths.- Kahn sort refactored to eliminate direct coupling to
stk_modules.
Fixed
- Fixed silent deferrals during
stk_init. - Fixed logic error where
stk_pending_retrycould be bypassed in certainstk_pollexit paths.
Full Changelog: v1.0.0-pre.2...v1.0.0-pre.3