ModifierPlayground: the build-mode gate and the stub text contradict each other

Open
#134 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, swift

Research direction

Start with Sources/Showcase/ModifierPlayground.swift at lines 4-7 and 82-85, then compare the SKIP_MODE_FUSE definition in Package.swift at line 57 with the APIs referenced in Fuse/ComposeView.swift. Reproduce both Fuse and Lite Android builds and determine which implementation is intended for each mode. Done means the gate, header comment, and unavailable-mode text consistently describe the behavior, with the relevant build behavior verified.

Written by the indexing model from the issue text.

Description

Where: Modifiers —
ModifierPlayground.swift#L4-L7,
#L82-L85

Steps to reproduce (Android, SKIP_MODE=fuse)

  1. Build and run the Showcase with SKIP_MODE=fuse.
  2. Open Showcase › Modifiers.

Expected: either the playground, or a stub that accurately explains why it is unavailable in this mode.
Actual: the stub reads "ModifierPlayground uses ContentModifier with .composeModifier(), a Fuse-only extension." and "Run the app with SKIP_MODE=fuse to see this playground." while the app is already running in Fuse mode. Lite builds get the full playground.

Cause: the gate #if !os(Android) || !SKIP_MODE_FUSE (L7) gives the full implementation to iOS and Lite-Android and the stub to Fuse-Android (SKIP_MODE_FUSE is only defined for Android Fuse builds, Package.swift L57). The header comment (L4-L6) and the stub text describe the opposite arrangement. The full implementation uses // SKIP @nobridge and #if SKIP blocks, which suggests it was written for Lite; skip-fuse-ui 1.19.0 also declares composeModifier/ContentModifier (Fuse/ComposeView.swift).

Suggested fix: if the full playground is meant to be Lite-only, keep the gate and correct the header comment and stub text (e.g. "uses Lite-only APIs; build without SKIP_MODE=fuse to see it"). If it is meant to run on Fuse, invert the gate and port the #if SKIP blocks to the Fuse API.

Dominant language
Swift
Stars
44
Forks
19
Avg merge
6h 27m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from skiptools/skipapp-showcase

All issues in skiptools/skipapp-showcase

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.