10 KiB
10 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
1.0.0-pre.5 - 2026-03-07
Changed
stk_init(): replaced per-modulestk_pending_add()calls inside the deferred module loop with batch collection followed by a singlestk_pending_add_batch()call after the loop.
1.0.0-pre.4 - 2026-03-07
Changed
stk_pending_retry(): replaced per-modulereallocatattempt_loadwith a single bulk allocation upfront (module_count + stk_pending_count) before the retry loop.stk_poll(): replaced per-modulestk_pending_add()calls inside the unload and cascade loops with batch collection followed by a singlestk_pending_add_batch()call after each loop.
1.0.0-pre.3 - 2026-03-07
Added
STK_MOD_DEP_LOG_BUFFER(2048) added tostk.h
Changed
- Dependency failure logging now emits a single line per module listing all unmet deps with their reason:
not foundorrequires <constraint>, have <version>Deferring 'test_mod_dep': unmet deps: test_mod (not found)Unloading 'test_mod_dep': unmet deps: test_mod (not found), renderer (requires ^2.0.0, have 1.3.0)
- Silent defer at
stk_initand vague"unmet dependencies"cascade log instk_pollreplaced withstk_log_dependency_failures() - Kahn topological sort refactored into generic
stk_kahn_sort()accepting ahas_depcallback and anon_cyclecallback, decoupling it fromstk_modules.stk_topo_sort()is now a thin wrapper.stk_sort_load_order()uses the same core viastk_batch_has_dep(), inspecting tmp files so simultaneous load events are processed dependency-first without a retry cycle stk_module_load()split intostk_module_preload(),stk_module_activate(),stk_module_discard(), andstk_validate_dependencies_single(). Init is not called if deps are unmet- On UNLOAD events in
stk_poll(), the unload set is expanded to include all transitively dependent modules viastk_collect_dependents(), sorted dependents-first viastk_sort_unload_order(). Modules unloaded due to expansion are queued to pending - On LOAD events with unmet dependencies, the tmp path is added to the pending queue instead of being dropped
stk_pending_retry()now skips already-loaded entries and prunes entries whose file no longer existsfree_polllabel moved abovestk_pending_retry()so retry always runs regardless of exit path
1.0.0-pre.2 - 2026-03-06
Fixed
- Module
initis no longer called if dependencies are not satisfied. The library handle is unloaded and a dep error is returned.
1.0.0-pre.1 - 2026-03-06
Added
- Dependency System: Full module dependency declaration and resolution
- Modules declare dependencies via an exported
stk_mod_depssymbol, no stk headers required in modules, only the memory layout contract must be respected ({ char[64], char[32] }sentinel-terminated array) - Version constraint operators:
=(exact),>=(minimum, default),^(compatible — same major, greater or equal minor/patch) - Version defaults to
0.0.0if not provided or unparseable - Dependency validation on
stk_initand everystk_pollcycle - Topological sort with cycle detection, load and unload ordering enforced
- All dependency failures logged before returning
- Modules declare dependencies via an exported
- Cascade Unload: When a module is removed, all dependents cascade unload automatically and are added to the pending queue. Cascades repeat until the loaded set is stable
- Pending Queue: Modules that fail dependency validation are deferred. When their dependencies become available they are retried and loaded automatically. Entries are removed if their file is deleted
Changed
stk_set_module_dependencies_fnrenamed tostk_set_module_deps_sym. Deps are now an exported array symbol, not a function- Default deps symbol name changed from
stk_mod_dependenciestostk_mod_deps stk_dep_tadded to public headerstk.hstk_mod_tfield order changed to largest-to-smallest for correct memory alignment with zero padding waste- Dependency validation failure during
stk_initno longer fatal, affected modules are deferred to the pending queue - Poll cycle now logs the full loaded module list as a single summary after any event that changes the loaded set, instead of logging each module individually
Notes
- This release marks Phase 1 complete: hot-reloading foundation with dependency management
- Memory layout contract for
stk_mod_deps: sentinel-terminated array of{ char[64], char[32] }. Modules do not need to includestk.h, define the struct inline or via your engine's own header as long as the layout matches
0.1.3 - 2026-02-25
Added
- Module Metadata: Optional metadata support for modules
stk_mod_name- human-readable module namestk_mod_version- semantic version stringstk_mod_description- module description- All three are optional, missing symbols are not errors
- Metadata stored in tight-packed arrays with index mappings
- Setter functions to override default symbol names before
stk_init()
0.1.2 - 2026-02-15
Fixed
- Windows
- Module reload now works correctly, idk how it was broken
- Temp directory creation fixed
.tmpdirectory now hidden via FILE_ATTRIBUTE_HIDDEN- Test build fixed
- Force cmd.exe shell in gmake.mk
- Fix bash syntax errors when running build.bat
- All Platforms: platform_mkdir now checks if directory exists before creating
0.1.1 - 2026-02-14
Fixed
- Logging: Corrected log level severity order in enum
- Reversed order so DEBUG (0) < INFO (1) < WARN (2) < ERROR (3)
- Fixes filtering logic where ERROR/WARN were incorrectly blocked
- Default INFO level now properly shows INFO, WARN, and ERROR while filtering DEBUG
0.1.0 - 2026-02-14
Fixed
- C89 Compliance: Removed stdint.h dependency (C99 feature)
- Replaced all uint8_t with unsigned char throughout codebase
- Ensures strict C89 compliance for maximum portability
Added
-
Flags system: Centralized bitfield for boolean state and settings
- Replaces stk_initialized with stk_flags for efficient memory usage
- Single byte packs all boolean flags (STK_FLAG_INITIALIZED, STK_FLAG_LOGGING_ENABLED)
- Runtime-changeable logging control via stk_set_logging_enabled()
-
Enhanced logging system: Complete rewrite with modern features
- Log levels: ERROR, WARN, INFO, DEBUG with runtime filtering
- Timestamps: yyyy-mm-dd HH:MM:SS.mmm format (platform-specific implementation)
- Configurable log output stream (stk_set_log_output)
- Configurable log prefix (stk_set_log_prefix, defaults to "stk")
- Configurable minimum log level (stk_set_log_level, defaults to INFO)
- Platform abstraction for timestamps (GetLocalTime on Windows, gettimeofday on POSIX)
Changed
- BREAKING: stk_log() signature changed from stk_log(FILE *fp, ...) to stk_log(stk_log_level_t level, ...)
- BREAKING: All uint8_t types replaced with unsigned char
- All internal STK messages now use appropriate log levels
- Setting log output to NULL disabls logging
Notes
- This release completes Phase 1 logging improvements
- Dependency management still in progress for Phase 1 completion
0.0.4 - 2026-02-11
Fixed
- Linux: Fixed segfault from invalid module indices during extremely rapid file changes
- Added validation check to skip stale UNLOAD/RELOAD events for already-unloaded modules
- Prevents is_mod_loaded() returning -1 from being used as array index (SIZE_MAX)
- Fixed event count mismatch where loops would run more iterations than valid indices populated
- Completes the Linux hot-reload stability fixes from v0.0.2
0.0.3 - 2026-02-10
Fixed
- Compilation: Fixed GCC
-Wrestrictwarning in Linux directory watching code by replacingstrncpywithmemmovefor overlapping memory operations- Ensures clean compilation without warnings while maintaining identical runtime behavior
- Uses semantically correct function for moving memory within the same buffer
0.0.2 - 2026-02-09
Fixed
- Linux: Fixed segfaults during rapid module reloads when file changes are detected in quick succession
- Enabled file readiness checks on Linux (previously only used on Windows/BSD) to prevent loading partially-written shared libraries
- Fixed inotify event deduplication to actually remove duplicate events instead of just marking them
- Reordered reload operations to only unload old module after successfully copying new version, preventing invalid state when copy fails
- All platforms: Improved reload safety by deferring module unload until after successful file copy
Changed
- Made
is_file_ready()check available on all Unix platforms (was previously excluded on Linux)
0.0.1 - 2026-02-01
Added
- Cross-platform dynamic module loading (Linux, BSD, Windows)
- Hot-reloading of native modules at runtime
- File watching for automatic module reloads (inotify/kqueue/FindFirstFile)
- Basic module metadata support
- Basic logging infrastructure (stdout/stderr)
- Error handling for failed module loads
- Robust filename handling with proper buffer bounds checking
- Install/uninstall targets for Unix systems
- Test suite with cross-platform support
Notes
- Phase 1 in progress: logging system incomplete (no log levels, verbosity control, or output configurability)
- Dependency management and versioning not yet implemented
- API is unstable and subject to change in future releases