feat: workspace support (Phase 1)#27
Merged
Merged
Conversation
- Add WorkspaceConfig struct to Manifest (members, exclude, dependencies) - Parse [workspace] section with members array and version declarations - Parse [workspace.dependencies] and [workspace.dependencies.<ns>] - Support .workspace = true in dependency specs for version inheritance - Make [package] optional when [workspace] is present (virtual workspace) - Add 3 unit tests for workspace parsing
- Add find_workspace_root() for upward workspace discovery - Add merge_workspace_deps() for .workspace = true resolution - Virtual workspace: auto-select binary member as build target - Workspace toolchain/target overrides inherit to members - -p/--package flag for selective member builds - Members inside a workspace auto-inherit workspace config - Add e2e test: 3-member workspace (core + greeter + hello)
Path dependencies of transitive deps were resolved relative to the main project root, which fails for workspace members when greeter depends on core via path = "../core" but the build target is apps/hello. Fix: add resolveRoot to WorkItem so child deps resolve relative to their parent dep's directory. Also fix CI to pick the newest built mcpp binary (avoids stale cached binaries from different fingerprints).
- 05_errors.sh: remove naming prefix enforcement test (relaxed in 0.0.10) - 12_add_command.sh: mcpplibs is now default ns, no subtable header - 21_ninja_dyndep.sh: P1 per-file dyndep replaces global build.ninja.dd
- Name check in SemVer merge path now also accepts the map key name (handles synthesize_from_xpkg_lua setting composite package.name) - Rename test module from 'util' to 'acme.util' (util is a forbidden top-level name since 0.0.10)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds multi-package workspace support to mcpp:
[workspace]section parsing — members list, exclude list,[workspace.dependencies]with namespaced subtables.workspace = true— members inherit dependency versions from workspace root[workspace]but no[package](pure management node)find_workspace_root()walks up from member to find workspace root-p, --packageflag — build a specific workspace member:mcpp build -p httpDesign
path = "..."dependency mechanism — no new dependency semanticsexport/import, not by the build systemTest plan
.workspace = true, no-workspace detection