Commit 0cca9e0
committed
Post-#242 architecture review found the feature subsystem derived a package's
requested-feature set in two places that disagreed on transitive edges:
resolution (mergeActiveFeatureDeps) read the true per-edge spec, but activation
(apply) + the dep build.mcpp env re-derived it by scanning ONLY the root
manifest's direct deps. So a transitive dep's requested features and its
consumer's `default-features = false` were silently dropped — activation kept
seeding a default feature (defining its macro / keeping default-gated sources)
that resolution had already skipped, which at best ignores the opt-out and at
worst compiles default-gated sources against a dep that was never resolved.
- DependencyEdge now carries the per-edge requestedFeatures + defaultFeatures
(recorded in recordDependencyEdge from the spec).
- New aggregatedRequest(depPkgIndex): union requested features and OR
default-features over ALL incoming edges (Cargo diamond semantics), sourced
from the authoritative edge graph. Both feature activation and the dep
build.mcpp env consume it. Direct-dep behavior is unchanged (root edge carries
root spec); transitive edges are now honored, closing the pre-existing
"transitive dep->dep feature requests not propagated" gap too.
- #241 (review finding): emit MCPP_DEP_<NAME>_DIR under BOTH the dep's canonical
name AND its short (namespace-stripped) name, so dep_dir("compat.zlib") and
dep_dir("zlib") both resolve (code/doc no longer contradict); + a collision
guard in contract_env (two names sanitizing to one var warns instead of
silent last-wins).
e2e 127 (transitive opt-out honored + control). All feature e2e (67/71/72/79/
80/81/82/83/100/106/125/126) + unit 35/35 stay green.
1 parent 6918f16 commit 0cca9e0
3 files changed
Lines changed: 193 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
369 | 371 | | |
370 | 372 | | |
371 | 373 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
377 | 393 | | |
378 | 394 | | |
379 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1851 | 1851 | | |
1852 | 1852 | | |
1853 | 1853 | | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
1854 | 1862 | | |
1855 | 1863 | | |
1856 | 1864 | | |
| |||
1961 | 1969 | | |
1962 | 1970 | | |
1963 | 1971 | | |
| 1972 | + | |
| 1973 | + | |
1964 | 1974 | | |
1965 | 1975 | | |
1966 | 1976 | | |
| |||
2836 | 2846 | | |
2837 | 2847 | | |
2838 | 2848 | | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
2839 | 2872 | | |
2840 | 2873 | | |
2841 | | - | |
2842 | | - | |
2843 | | - | |
2844 | | - | |
2845 | | - | |
2846 | | - | |
2847 | | - | |
2848 | | - | |
2849 | | - | |
| 2874 | + | |
2850 | 2875 | | |
2851 | 2876 | | |
2852 | 2877 | | |
| |||
2879 | 2904 | | |
2880 | 2905 | | |
2881 | 2906 | | |
2882 | | - | |
2883 | | - | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
2890 | | - | |
2891 | | - | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
2892 | 2911 | | |
2893 | 2912 | | |
2894 | 2913 | | |
| |||
2901 | 2920 | | |
2902 | 2921 | | |
2903 | 2922 | | |
2904 | | - | |
2905 | | - | |
2906 | | - | |
2907 | | - | |
2908 | | - | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2909 | 2931 | | |
2910 | 2932 | | |
2911 | 2933 | | |
2912 | 2934 | | |
2913 | 2935 | | |
2914 | | - | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
2915 | 2941 | | |
2916 | 2942 | | |
2917 | 2943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
0 commit comments