Skip to content

fix(ci): pin Logos to a known-good commit to unbreak both build workflows - #293

Merged
SoCuul merged 1 commit into
SoCuul:mainfrom
InvalidPandaa:fix/pin-logos-orig-regression
Jul 27, 2026
Merged

fix(ci): pin Logos to a known-good commit to unbreak both build workflows#293
SoCuul merged 1 commit into
SoCuul:mainfrom
InvalidPandaa:fix/pin-logos-orig-regression

Conversation

@InvalidPandaa

Copy link
Copy Markdown
Contributor

Closes #292

Problem

Both build workflows currently fail during Logos preprocessing:

src/Features/Reels/ReelsPlayback.xm:43: error: Invalid argument structure in %orig
make[3]: *** [.../ReelsPlayback.xm.mm] Error 255

This affects anyone forking the repo and running the workflows — nothing in SCInsta changed.

Cause

buildapp.yml and buildtweak.yml check out theos/theos with ref: master and
submodules: recursive, so they always pull the newest Logos. On 2026-06-29,
theos/logos#114 ("Support multi-line block
arguments in %orig calls", commit 777925d) rewrote the %orig handler: it now replaces
everything from %orig to the end of the line and re-appends only ;.

Every %orig that is not alone on its line therefore loses the rest of its line,
including closing brackets:

Source After preprocessing
VOID_HANDLESCREENSHOT(%orig); VOID_HANDLESCREENSHOT(...;
return [SCIUtils liquidGlassEnabledBool:%orig]; return [SCIUtils liquidGlassEnabledBool:...;
[SCIUtils showConfirmation:^(void) { %orig; }]; [SCIUtils showConfirmation:^(void) { ...;

Hence the expected ']' and unterminated function-like macro invocation errors further
down the build. SCInsta uses this idiom in ~232 places; the code is correct and unchanged.

Fix

A Pin Logos to known-good version step in both workflows, right after Setup Theos:

- name: Pin Logos to known-good version
  run: |
    cd "$THEOS/vendor/logos"
    git fetch --depth=1 origin a62370066a97e36d59b200a9fa10c5091f5e8972
    git checkout a62370066a97e36d59b200a9fa10c5091f5e8972
  env:
    THEOS: ${{ github.workspace }}/theos

a623700 is the direct parent of 777925d, so only the regression is excluded and every
other upstream Logos fix is retained. Only the two workflow files change — no source edits.

Verification

logos.pl was run over all 37 sources under src/, and the generated output checked for
balanced (), {} and [] (comments and string/char literals stripped first):

Logos commit files checked broken
777925d (current master) 37 14
a623700 (pinned) 37 0

Run A reproduced the reported ReelsPlayback.xm:43 error exactly; the other 13 files produced
unbalanced output, worst being src/Tweak.x (()+15 {}+19 []+9).

The pin step itself was validated against a shallow clone of the public remote — the same
state actions/checkout with submodules: recursive leaves behind — confirming that
git fetch --depth=1 origin <sha> resolves a specific commit on theos/logos.

Notes

theos/logos master (777925d, theos/logos#114 "Support multi-line block
arguments in %orig calls") rewrote the %orig handler so that it replaces
everything from %orig to the end of the line and re-appends only ";".
Every %orig that is not alone on its line therefore loses the rest of its
line, including closing brackets:

    VOID_HANDLESCREENSHOT(%orig);            ->  VOID_HANDLESCREENSHOT(...;
    [SCIUtils liquidGlassEnabledBool:%orig]; ->  [SCIUtils ...Bool:...;
    removeItemsInList(%orig, YES);           ->  removeItemsInList(...;

Both build workflows check out theos/theos with ref: master and
submodules: recursive, so they picked the regression up automatically and
started failing during logos preprocessing/compilation:

    src/Features/Reels/ReelsPlayback.xm:43: error: Invalid argument structure in %orig
    src/Tweak.x: error: expected ']'
    src/Tweak.x: error: unterminated function-like macro invocation

Pin the logos submodule to a62370066a97e36d59b200a9fa10c5091f5e8972 in
both workflows. That is the direct parent of 777925d, so only SoCuul#114 is
excluded and every other upstream fix is kept. (An earlier guess that
5f1138c was the parent was wrong -- it sits 12 commits back and would
also revert SoCuul#100, SoCuul#103, SoCuul#105, SoCuul#109, SoCuul#110, SoCuul#112, SoCuul#113, SoCuul#115 and SoCuul#116.)

Verified locally by running logos.pl over all 37 sources under src/ and
checking the generated output for balanced brackets: 14 of 37 files broken
on 777925d, 0 of 37 on a623700. The pin step itself was validated against
a shallow clone of the public remote, matching what the runner does.

No source changes -- the project code is correct; this is purely an
upstream toolchain regression. Drop the pin once SoCuul#114 is fixed upstream.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@InvalidPandaa

Copy link
Copy Markdown
Contributor Author
image

@SoCuul

SoCuul commented Jul 27, 2026

Copy link
Copy Markdown
Owner

I haven't tried this myself, but I'm going to merge this as a stopgap until I am able to work on fixing compatibility with newer theos releases.

Thank you so much!

@SoCuul
SoCuul merged commit 7bb7180 into SoCuul:main Jul 27, 2026
@InvalidPandaa
InvalidPandaa deleted the fix/pin-logos-orig-regression branch July 27, 2026 08:29
Smelly-Ghost added a commit to Smelly-Ghost/SCInsta that referenced this pull request Aug 1, 2026
fix(ci): pin Logos to a623700 to work around %orig regression (SoCuul#293)
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.

bug: ipa build fails

2 participants