Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b252d2b4e | |||
| 08c846d641 |
+7
-1
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.0.0-pre.6] - 2026-03-07
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- `stk_poll()`: replaced per-module `stk_pending_add()` calls inside the load holes and `append_modules` loops with batch collection followed by a single `stk_pending_add_batch()` call after both loops complete.
|
||||||
|
|
||||||
## [1.0.0-pre.5] - 2026-03-07
|
## [1.0.0-pre.5] - 2026-03-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
@@ -173,7 +178,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Dependency management and versioning not yet implemented
|
- Dependency management and versioning not yet implemented
|
||||||
- API is unstable and subject to change in future releases
|
- API is unstable and subject to change in future releases
|
||||||
|
|
||||||
[Unreleased]: https://github.com/anth64/stk/compare/v1.0.0-pre.5...HEAD
|
[Unreleased]: https://github.com/anth64/stk/compare/v1.0.0-pre.6...HEAD
|
||||||
|
[1.0.0-pre.6]: https://github.com/anth64/stk/compare/v1.0.0-pre.5...v1.0.0-pre.6
|
||||||
[1.0.0-pre.5]: https://github.com/anth64/stk/compare/v1.0.0-pre.4...v1.0.0-pre.5
|
[1.0.0-pre.5]: https://github.com/anth64/stk/compare/v1.0.0-pre.4...v1.0.0-pre.5
|
||||||
[1.0.0-pre.4]: https://github.com/anth64/stk/compare/v1.0.0-pre.3...v1.0.0-pre.4
|
[1.0.0-pre.4]: https://github.com/anth64/stk/compare/v1.0.0-pre.3...v1.0.0-pre.4
|
||||||
[1.0.0-pre.3]: https://github.com/anth64/stk/compare/v1.0.0-pre.2...v1.0.0-pre.3
|
[1.0.0-pre.3]: https://github.com/anth64/stk/compare/v1.0.0-pre.2...v1.0.0-pre.3
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ stk_init();
|
|||||||
|
|
||||||
## Project Status
|
## Project Status
|
||||||
|
|
||||||
**Current Version:** 1.0.0-pre.5
|
**Current Version:** 1.0.0-pre.6
|
||||||
|
|
||||||
### What Works
|
### What Works
|
||||||
- Cross-platform module loading and hot-reloading
|
- Cross-platform module loading and hot-reloading
|
||||||
|
|||||||
@@ -331,6 +331,8 @@ size_t stk_poll(void)
|
|||||||
size_t dep_batch_count = 0;
|
size_t dep_batch_count = 0;
|
||||||
char (*cascade_batch)[STK_PATH_MAX_OS] = NULL;
|
char (*cascade_batch)[STK_PATH_MAX_OS] = NULL;
|
||||||
size_t cascade_batch_count = 0;
|
size_t cascade_batch_count = 0;
|
||||||
|
char (*load_batch)[STK_PATH_MAX_OS] = NULL;
|
||||||
|
size_t load_batch_count = 0;
|
||||||
|
|
||||||
if (module_count > 0) {
|
if (module_count > 0) {
|
||||||
module_ids = malloc(module_count * sizeof(*module_ids));
|
module_ids = malloc(module_count * sizeof(*module_ids));
|
||||||
@@ -526,6 +528,9 @@ begin_operations:
|
|||||||
stk_sort_load_order(loaded_mod_indices, load_count, file_list,
|
stk_sort_load_order(loaded_mod_indices, load_count, file_list,
|
||||||
stk_tmp_dir);
|
stk_tmp_dir);
|
||||||
|
|
||||||
|
load_batch = malloc(load_count * sizeof(*load_batch));
|
||||||
|
load_batch_count = 0;
|
||||||
|
|
||||||
for (i = 0; i < holes_to_fill; ++i) {
|
for (i = 0; i < holes_to_fill; ++i) {
|
||||||
target_index = unloaded_mod_indices[i];
|
target_index = unloaded_mod_indices[i];
|
||||||
file_index = loaded_mod_indices[i];
|
file_index = loaded_mod_indices[i];
|
||||||
@@ -536,7 +541,9 @@ begin_operations:
|
|||||||
load_result = stk_module_load(tmp_path, target_index);
|
load_result = stk_module_load(tmp_path, target_index);
|
||||||
if (load_result == STK_MOD_DEP_NOT_FOUND_ERROR ||
|
if (load_result == STK_MOD_DEP_NOT_FOUND_ERROR ||
|
||||||
load_result == STK_MOD_DEP_VERSION_MISMATCH_ERROR) {
|
load_result == STK_MOD_DEP_VERSION_MISMATCH_ERROR) {
|
||||||
stk_pending_add(tmp_path);
|
if (load_batch)
|
||||||
|
memcpy(load_batch[load_batch_count++], tmp_path,
|
||||||
|
STK_PATH_MAX_OS);
|
||||||
} else if (load_result != STK_MOD_INIT_SUCCESS) {
|
} else if (load_result != STK_MOD_INIT_SUCCESS) {
|
||||||
stk_log(STK_LOG_ERROR, "Failed to load module %s: %s",
|
stk_log(STK_LOG_ERROR, "Failed to load module %s: %s",
|
||||||
file_list[file_index],
|
file_list[file_index],
|
||||||
@@ -549,7 +556,7 @@ begin_operations:
|
|||||||
if (load_count > unload_count)
|
if (load_count > unload_count)
|
||||||
goto append_modules;
|
goto append_modules;
|
||||||
|
|
||||||
goto validate_deps;
|
goto finish_loads;
|
||||||
|
|
||||||
append_modules:
|
append_modules:
|
||||||
for (; i < load_count; ++i) {
|
for (; i < load_count; ++i) {
|
||||||
@@ -562,7 +569,9 @@ append_modules:
|
|||||||
successful_appends);
|
successful_appends);
|
||||||
if (load_result == STK_MOD_DEP_NOT_FOUND_ERROR ||
|
if (load_result == STK_MOD_DEP_NOT_FOUND_ERROR ||
|
||||||
load_result == STK_MOD_DEP_VERSION_MISMATCH_ERROR) {
|
load_result == STK_MOD_DEP_VERSION_MISMATCH_ERROR) {
|
||||||
stk_pending_add(tmp_path);
|
if (load_batch)
|
||||||
|
memcpy(load_batch[load_batch_count++], tmp_path,
|
||||||
|
STK_PATH_MAX_OS);
|
||||||
} else if (load_result != STK_MOD_INIT_SUCCESS) {
|
} else if (load_result != STK_MOD_INIT_SUCCESS) {
|
||||||
stk_log(STK_LOG_ERROR, "Failed to load module %s: %s",
|
stk_log(STK_LOG_ERROR, "Failed to load module %s: %s",
|
||||||
file_list[file_index],
|
file_list[file_index],
|
||||||
@@ -577,6 +586,15 @@ append_modules:
|
|||||||
if (successful_appends < (load_count - holes_to_fill))
|
if (successful_appends < (load_count - holes_to_fill))
|
||||||
stk_module_realloc_memory(module_count);
|
stk_module_realloc_memory(module_count);
|
||||||
|
|
||||||
|
finish_loads:
|
||||||
|
if (load_batch_count > 0)
|
||||||
|
stk_pending_add_batch(
|
||||||
|
(const char (*)[STK_PATH_MAX_OS])load_batch,
|
||||||
|
load_batch_count);
|
||||||
|
|
||||||
|
free(load_batch);
|
||||||
|
load_batch = NULL;
|
||||||
|
|
||||||
goto validate_deps;
|
goto validate_deps;
|
||||||
|
|
||||||
validate_deps:
|
validate_deps:
|
||||||
|
|||||||
Reference in New Issue
Block a user