diff --git a/CHANGELOG.md b/CHANGELOG.md index fdbaa47f..d7e28135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,56 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased, TODOs] -- nÂș of iterations of the program to automatically clear the cache (new model, cache) -- new model, for the compilation database? or feature key in the project? -- make the project model full owned, and cache it? -- generate a second `std.h` to bind to the Zork++ autogenerated `modulemap` when `libc++` -is selected as the target standard library -- implement the correct way of dealing with the `import std;` sentence when using `MSVC` +## [0.10.0] - 2024 - 08 - 07 + +### Feature + +- **Breaking** - *Targets*: `Executable` and `Tests` toml entries are removed in favour of `[targets.]` entries. +Each targets allow the user to build *N* independent final products, being these `binaries (executables)` for now, while static +and dynamic libs will be implemented in the upcoming releases + +- NOTE: A **target identifier** is the string value after the `.` on any `[targets.]` + +- Added a `--targets` CLI flag to manually specify what targets wants the user to be processed in the current invocation. +Ex: `--targets target1,target2,tests1,tests2,tests3` + +### Changes + +- `Tests`: `test` command now only runs those targets which they contain the string `test` in its **target identifier** + +- **breaking** - `project_root` property (under the `[compiler]` attribute) is renamed to `code_root` + +### Performance + +- The codebase suffered a major reorganization and re-factorization. These are all internal changes that aren't +exposed through the public API. The most notorious points are: + - The introduction of *flyweights* data-structures, that + allows to reduce the program's memory footprint dramatically, and also the size of the generated cache files, being only + created once and then only joined for being passed into iterable views that makes the full command line of every translation + unit. + - The amount of required code lines that was basic doing the same job generating arguments for every different + kind of translation unit + - All the generated commands are now stored in the cache as a separated entity, and they are only regenerated + if the translation unit was modified since the last program run + - The project model is now cached, and only rebuilt if the configuration file changes between different program iterations + - All the translation units are now processed in only one unique procedure, since they are managed as trait objects + in the main functions of the commands generation, and then small helpers creates, depending on the kind of translation unit + processed the different arguments required for the source file + +### Misc and or Internal + - Several internal APIs that uses helpers have received new unit tests, to ensure the robustness of their job + - There's a lot of legacy code removed, only maintained for backwards-compatibility reasons. + - `System headers (GCC and Clang)` that are importable translation units as modules are now translation units as well + - We managed to satisfy the *Rust* borrow checker while we use the project model as read-only data, while the cache + is handled exclusively via `&mut` (mutable references), allowing the codebase to be extremely fast and performant + - Other minor optimizations has been applied to procedures. We remove a lot of allocation points thanks to the newly introduced + `clone-on-write` idiom, to handle the data that comes borrowed since the configuration file up until the end of the process + +## [0.9.0] - 2024 - 05 - 25 + +### Feature + +- `MSVC` is now fully compatible with `import std` ## [0.8.8] - 2024 - 04 - 13 diff --git a/zork++/Cargo.lock b/zork++/Cargo.lock index ad829d0c..6f6c2c98 100644 --- a/zork++/Cargo.lock +++ b/zork++/Cargo.lock @@ -1149,7 +1149,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "zork" -version = "0.9.0" +version = "0.10.0" dependencies = [ "chrono", "clap 4.5.13", diff --git a/zork++/Cargo.toml b/zork++/Cargo.toml index b1c6bd95..87a77909 100644 --- a/zork++/Cargo.toml +++ b/zork++/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zork" -version = "0.9.0" +version = "0.10.0" authors = ["Zero Day Code"] edition = "2021" description = "A modern C++ project manager and build system for modern C++" diff --git a/zork++/src/lib/cli/input/mod.rs b/zork++/src/lib/cli/input/mod.rs index f4bf8091..9ea35079 100644 --- a/zork++/src/lib/cli/input/mod.rs +++ b/zork++/src/lib/cli/input/mod.rs @@ -30,7 +30,7 @@ use crate::project_model; #[derive(Parser, Debug, Default)] #[command(name = "Zork++")] #[command(author = "Zero Day Code")] -#[command(version = "0.9.0")] +#[command(version = "0.10.0")] #[command( about = "Zork++ is a build system for modern C++ projects", long_about = "Zork++ is a project of Zero Day Code. Find us: https://github.com/zerodaycode/Zork" diff --git a/zork++/src/lib/compiler/mod.rs b/zork++/src/lib/compiler/mod.rs index aad757c7..c776e553 100644 --- a/zork++/src/lib/compiler/mod.rs +++ b/zork++/src/lib/compiler/mod.rs @@ -131,9 +131,9 @@ fn process_targets<'a>(model: &'a ZorkModel<'a>, cache: &mut ZorkCache<'a>) -> R .iter() .filter(|(_, target_data)| target_data.enabled_for_current_program_iteration) { - // 2nd - Generate the commands for the non-module sources + // 1st - Generate the commands for the non-module sources generate_sources_cmds_args(model, cache, target)?; - // 3rd - Generate the linker command for the 'target' declared by the user + // 2nd - Generate the linker command for the 'target' declared by the user generate_linkage_targets_commands(model, cache, target)?; }