Skip to content

Sigil warns for iOS-only / Android-only tags; Anchored on Android whitelist (MOB-194, MOB-365) - #205

Merged
GenericJam merged 2 commits into
masterfrom
mob-194-platform-tag-warnings
Oct 15, 2026
Merged

GenericJam merged 2 commits into
masterfrom
mob-194-platform-tag-warnings

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

Fixes MOB-194 and MOB-365.

MOB-194. Mob.Sigil checked a tag against the union of priv/tags/ios.txt and priv/tags/android.txt, and only entered its iOS-only / Android-only branches when the tag was absent from that union, so they could never fire. tag_warning/2 now classifies by membership:

on ios.txt on android.txt result
yes yes silent
yes no ~MOB: <Tag> is iOS-only — not supported on Android
no yes ~MOB: <Tag> is Android-only — not supported on iOS
no no ~MOB: <Tag> is not in the Mob tag whitelist — pass-through as :tag

Tags declared through config :mob, :extra_tags or a plugin manifest stay silent, including a declared tag that only one core manifest lists (documented in the moduledoc).

MOB-365. Anchored added to priv/tags/android.txt. mob_new's Android bridge renders it (MobBridge.kt.eex:4339 "anchored" -> MobAnchored(node, m), MobAnchored at :4374; since mob_new 0.5.0, MOB-189).

Single-platform audit. Comparing the two manifests on origin/master, Anchored was the only tag on one and not the other, and it was a missing entry, not a real gap. With it added the two sets are identical, so the new warning fires for no packaged tag today. There are no real gaps to list.

Tests (test/mob/sigil_test.exs):

  • tag_warning/2 with synthetic manifests: both → nil, iOS-only, Android-only, unknown.
  • ~MOB(<Anchored />) (and Canvas/Icon/NativeView) through the real sigil emits no ~MOB: warning. Checked: with Anchored removed from android.txt this fails with <Anchored> is iOS-only.
  • The existing unknown-tag, :extra_tags and plugin-manifest tests still pass.
  • Full suite: 2078 passed.

Known limit: since the packaged manifests are now identical, the single-platform branches are reached only through tag_warning/2, not through the sigil. A comment in resolve_type/2 says not to pre-filter on membership.

Review: reviewer subagent (Codex rate-limited until 12:17 PM today): MERGE, two nitpicks (moduledoc precedence sentence, guard comment), both fixed in b785c09.

… whitelist (MOB-194, MOB-365)

The whitelist check tested the union of priv/tags/ios.txt and android.txt,
so its per-platform branches never fired. Classify a tag by manifest
membership instead: both -> silent, one -> warns naming the platform,
neither -> not in the whitelist. extra_tags and plugin tags stay silent.

Anchored was the only tag on one manifest: the Android bridge renders it
since mob_new 0.5.0 (MobBridge.kt.eex "anchored" -> MobAnchored), so it
joins android.txt.
@GenericJam
GenericJam merged commit 720358c into master Oct 15, 2026
4 checks passed
@GenericJam
GenericJam deleted the mob-194-platform-tag-warnings branch October 15, 2026 17:17
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