Skip to content

feat(workspace): self-referential mcpp [workspace] over the index#57

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/self-referential-workspace
Jun 30, 2026
Merged

feat(workspace): self-referential mcpp [workspace] over the index#57
Sunrisepeak merged 1 commit into
mainfrom
feat/self-referential-workspace

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

What

Makes mcpp-index both the package index (pkgs/) and a mcpp [workspace] that consumes it — the dual perspective. A virtual root [workspace] declares the per-library example projects under tests/examples/ as members; each resolves this repo's own pkgs/ through a local [indices] path. "Eat our own dog food."

Changes

  • mcpp.toml (repo root) — virtual [workspace], members = cjson / eigen / nlohmann.json / openblas.
  • tests/run_workspace.sh — thin driver; parses [workspace].members from the root manifest (single source of truth, no hardcoded duplication) and mcpp build && mcpp runs each member through the real index.
  • tests/examples/openblas/ — new L1-cfg consumer: [target.'cfg(windows)'.dependencies.compat] openblas + cfg(windows).build cxxflags=["-DHAVE_OPENBLAS=1"]. On Windows it calls cblas_dgemm asserting [19 22; 43 50]; on linux/macos it is a no-op and openblas is not pulled — proving per-OS deps gate on the resolved target triple. (Needs mcpp ≥ 0.0.75 cfg deps/flags + ≥ 0.0.73 windows-runtime-DLL deploy.)
  • .github/workflows/validate.ymldetect gains a workspace output (push/schedule always; PR when root mcpp.toml, tests/run_workspace.sh, or any tests/examples/* member changes) + new smoke-workspace job running the driver. MCPP_VERSION 0.0.73 → 0.0.77.
  • design doc §8 — implementation status.

Verified locally (mcpp 0.0.77)

  • member parse → 4 members; cjson builds+runs (resolves compat.cjson from own pkgs/); openblas builds+runs no-op on linux (openblas not pulled).
  • validate.yml passes yaml.safe_load.

🤖 Generated with Claude Code

The repo becomes both the package index (pkgs/) and a mcpp workspace that
consumes it: a virtual root [workspace] whose members are the per-library
example projects under tests/examples/, each resolving this repo's own pkgs/
via a local [indices] path. Eat our own dog food.

- root mcpp.toml: [workspace].members = cjson/eigen/nlohmann.json/openblas
- tests/run_workspace.sh: thin driver, members are the single source of truth
- tests/examples/openblas: L1-cfg consumer — Windows-only openblas dep+flags
  (cfg(windows)), cblas_dgemm assert on Windows, no-op on linux/macos
- validate.yml: detect.workspace output + smoke-workspace job; MCPP_VERSION
  0.0.73 -> 0.0.77 (carries L1 per-OS deps/flags + [xlings] env)
- design doc: §8 implementation status
@Sunrisepeak Sunrisepeak merged commit 1d33409 into main Jun 30, 2026
8 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/self-referential-workspace branch June 30, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant