Skip to content

MOB-387 host-set plist keys exempt from plugin collisions; MOB-392 build dep-shipped Rust static NIFs - #123

Merged
GenericJam merged 11 commits into
masterfrom
mob-plist-shared-keys
Oct 5, 2026
Merged

GenericJam merged 11 commits into
masterfrom
mob-plist-shared-keys

Conversation

@GenericJam

@GenericJam GenericJam commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

MOB-387: mob_bluetooth + mob_midi both declare NSBluetoothAlwaysUsageDescription → 'activated plugins conflict'. Host ios/Info.plist value wins (PlistBuddy Add), so scalar keys the host sets are exempt (cross_validate/2 :host_plist_keys; host_plist_keys/1 parses via xmerl / plutil for binary). Keys any plugin declares as an array still conflict.

MOB-392: a :static_nifs entry with no host C/Rust/Zig source (not plugin-contributed) is looked up in every dep from Mix.Project.deps_paths/0 (native/<name>/Cargo.toml; ambiguity raises). Rust NIFs build with cargo --target-dir _build/<env>/mob_rust_nifs/<name>. mob.doctor checks rust targets for such crates. (mob_rapier lab_physics was never built → 'cannot locate symbol lab_physics_nif_init'.)

GenericJam and others added 4 commits October 4, 2026 15:50
…sets the key

The host's ios/Info.plist value always wins (PlistBuddy Add never
overrides), so cross_validate/2 exempts plist keys the host sets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nary plists

Array values are merged into the host's array (plugin-to-plugin is
last-wins), so they still conflict. Commented-out keys no longer count
as host-set. Pin the raise_on_cross_plugin_conflicts! wiring to the
cwd's ios/Info.plist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the conflict

Regex scanning counted <key> markup inside CDATA as host keys; reuse
IosLayoutPlist's structural parse (new top_level_keys/1). Exempt a key
only when no plugin declares it as an array, so mixed array/scalar
collisions still raise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
classify_project_nif/2 also finds deps/*/native/<name>/Cargo.toml, and
the built archive path is derived from the manifest's dir. mob_rapier's
lab_physics was never built, so Operator crashed at launch with
'cannot locate symbol lab_physics_nif_init'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GenericJam
GenericJam force-pushed the mob-plist-shared-keys branch from 7133dd7 to a6da4d9 Compare October 4, 2026 22:05
@GenericJam GenericJam changed the title MOB-387: plugin plist-key collision is moot when the host Info.plist sets the key MOB-387 host-set plist keys exempt from plugin collisions; MOB-392 build dep-shipped Rust static NIFs Oct 4, 2026
GenericJam and others added 7 commits October 4, 2026 16:14
The deps/* glob missed path deps and custom MIX_DEPS_PATH. Two deps
shipping the same crate name now raises instead of picking one. The
archive path is one tested helper (rust_nif_archive/3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o _build

The dependency search runs only when the project has no C/Rust/Zig
source for the NIF and skips activated plugins. No blanket rescue around
deps_paths. cargo --target-dir puts every Rust NIF archive under
_build/<env>/mob_rust_nifs/<name> (read-only deps, workspaces,
CARGO_TARGET_DIR). mob.doctor checks Rust targets for dep crates. The
default deps_paths lookup is pinned with a path-dep fixture project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MobDev.Plugin.activated() verifies every plugin manifest (~120 ms in
Operator), and it ran once per NIF entry per ABI. nif_dep_dirs/0 does it
once and skips the dep search for plugin-contributed entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gin skip

The path-dep fixture test now covers the production lookup, and the
plugin skip is a pure nif_dep_dirs/2 with its own test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GenericJam

Copy link
Copy Markdown
Owner Author

Review: Codex rounds 1–3 (DO NOT MERGE → fixed); Codex rate-limited until 8:45 PM, so rounds 4–7 by a reviewer subagent (claude -p, read-only). Final: reviewer subagent (Codex rate-limited until 8:45 PM): MERGE.

@GenericJam
GenericJam merged commit e2a4695 into master Oct 5, 2026
6 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.

1 participant