Skip to content

0.0.99: #243 feature dep/feat forwarding + #238 xlings 0.4.67 + #230 windows build.mcpp#246

Merged
Sunrisepeak merged 6 commits into
mainfrom
feat/0.0.99-feature-forwarding-243-238-230
Jul 19, 2026
Merged

0.0.99: #243 feature dep/feat forwarding + #238 xlings 0.4.67 + #230 windows build.mcpp#246
Sunrisepeak merged 6 commits into
mainfrom
feat/0.0.99-feature-forwarding-243-238-230

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Closes #243, #238, #230. Batch收尾 for #230#243 (0.0.99).

#243 — feature dep/feat forwarding (Cargo parity)

A [features] implied token containing / (or the table-form forward = ["dep/feat"] key) forwards a feature to a dependency: one feature can both pull a local source set AND open a dependency's heavy feature. Unblocks a module package's optional module interface (opencv-m's import opencv.dnn;dnn pulls dnn.cppm locally and builds compat.opencv with features=["dnn"], instead of forcing +309 TU on every consumer).

  • One data model Manifest::featureForwards, two grammars (TOML + xpkg) sharing the single split point split_feature_forward_token.
  • Injected into the existing 0.0.98 aggregatedRequest/DependencyEdge funnel: forwarded features are added to a child's request before it is pushed onto the worklist, so both resolution (mergeActiveFeatureDeps pulls the forwarded feature's conditional deps) and activation (recordDependencyEdgeaggregatedRequestapply emits defines/sources) observe it. Transitive via the BFS forward edge (root→mid→leaf).
  • Additive with [enhancement] 消费端 default-features 关闭语法(default = [...] 已有,但退不掉;挡住 compat.ffmpeg 裁剪档形态) #242 default-features = false. Forward to an undeclared dep → strict error / warning; undefined dep feature reuses the existing does-not-declare gate.
  • Tests: 3 unit (TOML array/table + xpkg), e2e 128_feature_forwarding.sh (transitive tree, both mcpp build and mcpp test).

#238 — ≥2 project-level index_repos install silently fails

Root cause is in xlings (openxlings/xlings#374, now closed/fixed). Vendored xlings 0.4.62 → 0.4.67 (carries cf9b60d5 multi-repo install fix). mcpp-side diagnostics already landed in 0.0.98.

#230 — Windows mcpp test --workspace exit 127

The scanner symlink-escape crash (the real exit-127) was already fixed in 0.0.96 (df985df, in HEAD) + main.cpp top-level catch. This PR adds the secondary Windows surface: build.mcpp compiled to build.mcpp.bin, which Windows cmd.exe can't launch — now build.mcpp.exe on Windows (is_windows constexpr; non-Windows bytes unchanged). Reached by a workspace build-mcpp member on Windows only after the scanner fix stops masking it.

Verification

  • Self-host mcpp build + mcpp test (all 35 unit test binaries, 0 failed) green.
  • e2e regression: 89/92/125 (build.mcpp), 126/127 (default-features), 128 (forwarding) all pass.
  • Design: .agents/docs/2026-07-19-v0.0.99-feature-forwarding-238-230-design.md.

🤖 Generated with Claude Code

…windows

Reconciles the #243 forwarding design onto the actual 0.0.98 funnel
(DependencyEdge + aggregatedRequest, landed by 0cca9e0) instead of the
superseded requestedFeaturesByPkg accumulator, and folds in the #238
(vendored xlings 0.4.67) and #230 (build.mcpp .exe) plans.
…rammars

Add Manifest::featureForwards (featureName -> [(depStableKey, depFeature)])
and one shared split point split_feature_forward_token in
dependency_selector. A [features] implied token containing '/' (or the
dedicated table-form 'forward' key) forwards a feature to a dependency,
Cargo-parity. Both the TOML and xpkg-descriptor grammars partition '/'
tokens out of implies into featureForwards (raw depKey == stableMapKey,
same keyspace as dependencies/featureDeps). Unit tests for both surfaces.
…funnel

When a resolved package's feature is active, inject the features it
forwards to each child into that child's request BEFORE it is pushed onto
the worklist. One injection covers both consumption points: resolution
(mergeActiveFeatureDeps folds the forwarded feature's conditional deps)
and activation (recordDependencyEdge -> aggregatedRequest -> apply emits
its defines/sources). Transitive forwarding rides the BFS forward edge
(root->mid->leaf); additive with #242 default-features=false. A forward
to an undeclared dep is a strict error / non-strict warning; an undefined
dep feature reuses the existing does-not-declare gate. e2e 128 covers the
transitive tree on both mcpp build and mcpp test.
build.mcpp compiled to build.mcpp.bin, which Windows cmd.exe (the
capture_exec shell there) cannot launch — .bin is not in PATHEXT. Name it
build.mcpp.exe on Windows (is_windows is constexpr; non-Windows keeps
.bin, bytes unchanged). Surfaces once a workspace build.mcpp member is
reached on Windows, after the scanner symlink-escape crash fix (df985df)
stops masking it as exit 127.
#238)

xlings 0.4.67 carries openxlings/xlings#374 (fix(xim): surface multi-repo
install failures + best-effort catalog, cf9b60d5), so a workspace member
with >=2 inherited index_repos installs uncached packages instead of
failing silently at exit 1. Bump release/cross-build/e2e pins 0.4.62 ->
0.4.67.
@Sunrisepeak
Sunrisepeak merged commit 91660f6 into main Jul 19, 2026
7 checks passed
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.

[enhancement] manifest [features] 支持条件依赖与依赖 feature 转发(dep/feat;挡住 opencv 模块包的 opencv.dnn 接口)

1 participant