pub fn phase_platform_lock(
target: BuildTarget,
selected: Platform,
parsed: &[ParsedFile],
groups: &BTreeMap<String, Vec<usize>>,
kinds: &BTreeMap<String, UnitKind>,
unit_tables: &HashMap<String, UnitTable>,
unit_consumes: &HashMap<String, Vec<String>>,
unit_consumes_aliases: &HashMap<String, HashMap<String, String>>,
unit_flattened: &HashMap<String, HashMap<String, String>>,
errors: &mut ErrorSink,
)Expand description
v0.19 (decisions 0017/0024): enforce the platform lock per deployment
unit — each context under --target workers, the whole program under
bundle (co-location shares the lock).
P5.3 (design/tracks/semantics-in-the-checker.md §6): relocated from
bynk-emit/src/project/validate.rs’s check_platform_lock — category 5
of analysis.rs’s own seven-category residual-gap accounting (“gap in
name only”: analyse_project hardcodes Platform::default()
(Cloudflare) and BuildTarget::Bundle, and bynk.cloudflare is the only
platform-native unit that exists, so lock_violation can never fire on
that path regardless of where this function lives — see analysis.rs’s
own doc for why R3.5 still requires the move).