Skip to content

emrg: add iscc compile gate to Windows test job - #731

Merged
argszero merged 6 commits into
masterfrom
feature/iss-compile-gate
Aug 13, 2026
Merged

emrg: add iscc compile gate to Windows test job#731
argszero merged 6 commits into
masterfrom
feature/iss-compile-gate

Conversation

@argszero

@argszero argszero commented Aug 13, 2026

Copy link
Copy Markdown
Owner

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

  1. .github/workflows/test.yml — new "Inno Setup script compile smoke test" step in the test-windows job: renders make-installer.sh's emrg.iss heredoc (self-syncing sed anchor, same variable expansion as the real build), stubs the gen-assets icon.ico + {app} referenced files, and compiles with the runner's preinstalled iscc. Every PR now catches .iss syntax/signature/type errors.
  2. packaging/make-installer.sh — LoadStringFromFile(LogFile) → LoadStringFromFile(LogFile, LogText) (2-param out-param form).
  3. packaging/make-installer.sh — LogText declared AnsiString (Inno 6 string = UnicodeString → passing it to var S: AnsiString is a compile-time Type mismatch, caught by the new gate).
  4. tests/test_installer_stop.py — positive/negative assertions pinning the correct call form and the AnsiString variable type.

Verification

  • test (ubuntu): actionlint + pytest 761 + GUI 229 — PASS
  • test-windows: pytest + iscc compile smoke test — PASS (proves the .iss now compiles)

argszero and others added 5 commits August 13, 2026 10:58
…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

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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) with LogText: 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (3/3)

Branch unchanged since 1/3 review (23de096); CI still green (test + test-windows, run 31663078864 SUCCESS). 3 consecutive approvals from different cycles — merging.

@argszero
argszero merged commit ca367ed into master Aug 13, 2026
2 checks passed
argszero pushed a commit that referenced this pull request Aug 13, 2026
…entries (#744)

Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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