46 lines
2.6 KiB
Markdown
46 lines
2.6 KiB
Markdown
# Changelog
|
|
|
|
All notable changes to cargoxx will be documented in this file.
|
|
|
|
## [Unreleased]
|
|
|
|
### Added
|
|
- M0 repo skeleton: hand-written `CMakeLists.txt`, bootstrap `flake.nix`,
|
|
empty C++23 module units for every component listed in `TECH_SPEC.md` §1
|
|
(`util`, `exec`, `manifest`, `lockfile`, `layout`, `linkdb`, `resolver`,
|
|
`codegen`, `cli`), root module `cargoxx`, and a stub `main.cpp` that
|
|
builds an empty `cargoxx` binary.
|
|
- `.clang-format` (LLVM, 100-column) and `.gitignore`.
|
|
- `SPEC.md`, `TECH_SPEC.md`.
|
|
- M1 foundation in `cargoxx.util`: `ErrorCode` (numbers per `TECH_SPEC.md` §4),
|
|
`Error`, `Result<T> = std::expected<T, Error>`, and `format(Error)` rendering
|
|
`error[Ennnn]: ...` with optional `--> path:line:col` and `hint:` lines.
|
|
`format` lives in `src/util/error.cpp` as a module implementation unit.
|
|
- `Catch2 v3` wired through `flake.nix` (libc++-built override) and registered
|
|
in CMake; `tests/util_error.cpp` covers six format cases via
|
|
`catch_discover_tests`.
|
|
- `cargoxx.manifest` public types (`Package`, `Dependency`, `BuildSettings`,
|
|
`Edition`, `Manifest`) and `parse(path)` returning `Result<Manifest>`,
|
|
backed by toml++ vendored as `third_party/toml.hpp`. Unknown keys in
|
|
`[package]` / `[build]` and unknown top-level keys are rejected; reserved
|
|
fields (`description`, `repository`, `[dev-dependencies]`, `[features]`,
|
|
`[workspace]`) are accepted. `tests/manifest_parse.cpp` covers 17 cases.
|
|
- `manifest::write(m, path)` serializes a `Manifest` as TOML using toml++.
|
|
Dependencies are emitted alphabetically (matches Cargo). Round-trip
|
|
property is exercised by `tests/manifest_write.cpp` (9 cases).
|
|
Defaulted `operator==` on the manifest structs supports comparison.
|
|
- `cargoxx.layout` public types (`Target`, `TargetKind`, `DiscoveredLayout`)
|
|
and `discover(project_root, package_name)`. Walks `src/` recursively
|
|
for the library (excluding the `src/bin/` subtree), enumerates
|
|
`src/main.cpp`, `src/bin/*.cpp`, `tests/*.cpp`, `examples/*.cpp` flat,
|
|
sorts results for deterministic output, and returns `LayoutNoTarget`
|
|
when neither a library nor any binary is present.
|
|
`tests/layout_discovery.cpp` covers 12 cases.
|
|
- `cargoxx new <name>` and `cargoxx new --lib <name>` scaffold a project
|
|
directory with `Cargoxx.toml`, `src/main.cpp` or `src/lib.cppm`, and a
|
|
minimal `.gitignore`. Hyphens in the package name are mapped to
|
|
underscores when generating the module/namespace identifier.
|
|
Codegen of `flake.nix` / `CMakeLists.txt` is intentionally deferred to M3.
|
|
CLI11 v2.6.2 vendored at `third_party/CLI11.hpp`; entry point is now
|
|
`cargoxx::cli::run(argc, argv)`. `tests/cmd_new.cpp` covers 9 cases.
|