emrg: add iscc compile gate to Windows test job - #731
Conversation
…lease windows gate) v0.2.30 Build Release 31661378619 failed at the windows 'Make installer' step: iscc rejected the emrg.iss [Code] section with 'Invalid number of parameters' on LoadStringFromFile(LogFile). Root cause: Inno Setup's Pascal Script API declares function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean; (2-param out-argument form, identical in 6.7.1 through 7.x — verified against issrc Shared.ScriptFunc.pas). #727's R125 log-surfacing code called the non-existent 1-param string-returning form; the Test workflow never compiles the .iss, so the error only surfaced at tag-push Build Release (v0.2.7 lesson recurring). Fix (folded into #731's iscc gate): - make-installer.sh: call LoadStringFromFile(LogFile, LogText) (out-param), keep FileExists guard + 2000-char truncation - tests/test_installer_stop.py: assert the 2-param form (positive) and forbid the 1-param form (negative)
- make-installer.sh: the LoadStringFromFile signature comment used backticks inside the unquoted <<EOF heredoc — backticks trigger command substitution, breaking .iss rendering in the real build too (iscc gate caught it) - test.yml: split assignment from export to silence shellcheck SC2318/SC2097/SC2098 in the gate step
- test.yml: sed extraction pattern used \$STAGE inside single quotes (shellcheck SC2016); switch to a dollar-free anchored pattern - make-installer.sh: reword heredoc comment to avoid literal command substitution syntax
…cc Type mismatch)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1/3)
Reviewed the full branch (6 commits, both channels' work converged). This fixes the v0.2.30 Build Release failure 31661378619 (windows iscc rejected the .iss [Code] section).
Root cause: Inno Setup's script API is LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean (2-param out-arg; verified against issrc Shared.ScriptFunc.pas at is-6_7_1/is-6_7_3/is-7_1_0/main). #727's R125 code used the non-existent 1-param string-returning form → 'Invalid number of parameters' at compile; Test CI never compiled the .iss so it only surfaced at tag push (v0.2.7 lesson recurring).
Changes (all verified):
- make-installer.sh:
LoadStringFromFile(LogFile, LogText)withLogText: AnsiString(var-param strict typing; string → 'Type mismatch', caught by 31662985004) - make-installer.sh: heredoc comment de-backticked (backticks trigger command substitution inside unquoted <<EOF)
- test.yml windows job: iscc compile smoke gate — renders the .iss heredoc (stub payload + stub icon.ico + {app} files, since icon.ico is a gitignored gen-assets product) and runs the runner's iscc; actionlint-clean (SC2016/SC2097/SC2098/SC2318 all resolved)
- tests/test_installer_stop.py: positive asserts (2-param form + AnsiString) and negative assert (1-param form forbidden)
Verification: run 31663078864 SUCCESS — test (actionlint + 761 pytest + GUI) and test-windows (pytest + iscc compile) both green. MERGEABLE/CLEAN. This gate would have caught the v0.2.30 failure before tagging.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. Verified: iscc compile gate passes on the 6-commit branch (LoadStringFromFile 2-param out-param form + LogText: AnsiString); CI run 31663078864 both test + test-windows SUCCESS (actionlint + doc-count guard + iscc gate). The gate reproduces the exact v0.2.30 Build Release failure mode and now compiles clean.
Summary
Fix the v0.2.30 Build Release Windows gate failure (iscc "Invalid number of parameters" at emrg.iss:183:47 on run 31661378619) and add a permanent CI gate so .iss compile errors surface on every PR instead of only at tag-push build time.
Root cause
The #727 stop-log block in packaging/make-installer.sh called LoadStringFromFile(LogFile) — but Inno Setup's Pascal Script signature is function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean (2-param out-param form, no 1-param string-return form). Test CI never compiles the .iss (only the tag-triggered Build Release runs iscc), so the error shipped.
Changes
Verification