feat(workspace): add multi-package workspace builds with shared lock and CAS
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s

- SDK: Workspace/workspace() declaration plus Project::workspace_dependency()
- Frontend: workspace.cpp discovery/evaluation alongside build.cpp
- Main: per-member builds sharing the root vbs.lock and build/.vbs CAS, --member and --changed-since selection
- Cross-member native linking; member builds do not steal the root compile_commands.json alias
- Path-dependency snapshots exclude generated editor metadata
- Verified in Docker GCC 16: 8/8 CTest suites; 3-member workspace fixture with unified lockfile
This commit is contained in:
faumaray committed 2026-12-03 13:07:09 +03:00
1 parent 09c0a91d1d
commit 2970fbe25c
12 files changed
+515 -19

No files matched your search

+20 -1
View File
@@ -89,7 +89,7 @@ All CLI help text (`vbs --help`, `vbs <command> --help`, `vbs compdb --help`, `v
- `vbs [--version] [--verbose] [--quiet] <command>`
- `vbs init [--dir DIR] [--name NAME] [--library] [--with-toml] [--force]`
- `vbs build [--project DIR] [--build-dir DIR] [--profile NAME]... [--target NAME]... [--compiler gcc|clang] [--editor-profile NAME] [--build-source FILE]... [--jobs N] [--remote-cache URL] [--remote-cache-token-env VAR] [--locked] [--offline] [--no-cache] [--native-foreign] [--verbose] [--quiet]`
- `vbs build [--project DIR] [--build-dir DIR] [--profile NAME]... [--target NAME]... [--compiler gcc|clang] [--editor-profile NAME] [--build-source FILE]... [--jobs N] [--member PKG]... [--changed-since REF] [--remote-cache URL] [--remote-cache-token-env VAR] [--locked] [--offline] [--no-cache] [--native-foreign] [--verbose] [--quiet]`
- `vbs test ...` (same flags as `vbs build`, then runs selected `TargetKind::Test` binaries)
- `vbs clean [--build-dir DIR] [--all]`
- `vbs doctor`
@@ -130,6 +130,25 @@ void build(Void::Build::Project &project) {
}
```
### Workspaces
A workspace root declares member projects in `workspace.cpp`:
```cpp
#include <Void/Build.hpp>
void workspace(Void::Build::Workspace &ws) {
ws.member("lib", "packages/lib");
ws.member("app", "packages/app");
ws.member("tests", "packages/tests");
}
```
Each member keeps its own `build.cpp` and profiles, while `vbs build`/`vbs test` at the root
share one `vbs.lock` and one `build/.vbs` CAS. Members link each other with
`project.workspace_dependency("lib").target("libcore")`, and `--member PKG` or
`--changed-since REF` select affected members.
See the [SDK reference](docs/SDK.md), [public header](include/Void/Build.hpp), and
[VoidLibrary upstream requests](docs/VOIDLIBRARY_UPSTREAM_REQUESTS.md).