You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two contributors naming one file: the closer one decides it, and one destination has one claimant
Review of the 0.12.0 branch before merge found the graph-contribution merge
inconsistent with the precedence its own documentation states.
`contributions` is ordered highest priority first: the application's own
libraries, then the graph's packages requesters first. The resources merge walks
it backwards, so a higher-priority contributor's resource overrides a lower
one's through `aapt2 -R`. The assets merge walked it forwards into
`collect_tree`, which copies with `overwrite_existing`, so the LAST write won
and the deepest dependency decided a file two packages name. Measured on the
fixture below: `assets/graph-asset.txt` held `from-the-deeper-library` where the
documented order gives `from-the-requester`. The walk is now backwards, for the
same reason the resources walk is.
`lib/<abi>/` is flat, so the application's own library, an archive's native
library of the same name, and a second archive's copy of it all address one
file. Each went through `place_library`, which emits a step whose id and output
are derived from the ABI and the leaf name: two claimants produced two steps
with one id writing one path. One destination now has one claimant, the first in
the priority order, and a later claim is reported by name rather than written.
`mcpp::plugins::json` decoded each `\u` escape on its own, so a code point above
U+FFFF -- which reaches JSON as a surrogate PAIR -- became two three-byte
sequences holding unpaired surrogates: not UTF-8, and silently wrong in whatever
`AndroidManifest.xml` or `Info.plist` the value was written into. Pairs are now
combined, and a surrogate that is not half of one is refused. mcpp's own writer
escapes only characters below 0x20 and passes UTF-8 through, so no producer
reaches this path today, which is why nothing reported it; the reader is shared
by `dist-apk` and `dist-apple` and should not corrupt what it cannot represent.
Criterion: `tests/apk-consumer-graph` gains `lib2/`, which `lib/` depends on, so
the two contribute one asset name at two distances. Leg (6) reads the packed
`assets/graph-asset.txt`. With the walk reverted it fails with
`from-the-deeper-library`; with it in place the five legs pass on 2026.9.16.1.
0 commit comments