Skip to content

Commit 3a05804

Browse files
pgodwinclaude
andcommitted
ci/fix: pin TinyGo 0.41.1 in pr-ci/release-main; fix installer Pascal Script type mismatch
- .github/workflows/{pr-ci,release-main}.yml pinned tinygo-version "0.41.0", which cannot assemble a goroot from the Go 1.26 stdlib the runner resolves to ("package internal/strconv is not in std") — refactor-harness.yml's TinyGo amd64 gates job already carries this exact fix+errata comment; the other two workflows were never updated to match. Confirmed via this PR's own "Build Embedded (TinyGo)" job. - packaging/windows/ClassicStack.iss: ResolveVolumesPlaceholder failed to compile ("Type mismatch") because LoadStringFromFile's second parameter is `var S: AnsiString`, a by-reference parameter that requires an exact type match, while Contents was declared as the default Unicode `string`. Load into a dedicated AnsiString and convert, per Inno Setup's Pascal Script rules for LoadStringFromFile/SaveStringToFile. The .iss fix is reasoned from the Pascal Script signatures, not locally compiled — no Windows/ISCC toolchain available here. Will confirm against the next CI run rather than claim it's verified. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent d40b953 commit 3a05804

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/pr-ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,11 @@ jobs:
225225
- name: Setup TinyGo
226226
uses: acifani/setup-tinygo@v2
227227
with:
228-
tinygo-version: "0.41.0"
228+
# 0.41.0 cannot assemble a goroot from a Go 1.26 stdlib — it fails with
229+
# "package internal/strconv is not in std", which 1.26 introduced. The
230+
# runner resolves to 1.26 despite go.mod pinning 1.25.12, so track 0.41.1
231+
# (see refactor-harness.yml's TinyGo amd64 gates job, fixed there first).
232+
tinygo-version: "0.41.1"
229233

230234
- name: Build WT32-ETH01
231235
run: bash scripts/build_wt32eth01.sh

.github/workflows/release-main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ jobs:
216216
- name: Setup TinyGo
217217
uses: acifani/setup-tinygo@v2
218218
with:
219-
tinygo-version: "0.41.0"
219+
# 0.41.0 cannot assemble a goroot from a Go 1.26 stdlib — see
220+
# refactor-harness.yml's TinyGo amd64 gates job, fixed there first.
221+
tinygo-version: "0.41.1"
220222

221223
- name: Build WT32-ETH01
222224
run: bash scripts/build_wt32eth01.sh

packaging/windows/ClassicStack.iss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,25 @@ end;
304304
procedure ResolveVolumesPlaceholder;
305305
var
306306
ConfigFile, Contents, VolumesPath: string;
307+
RawContents: AnsiString;
307308
begin
308309
ConfigFile := ExpandConstant('{commonappdata}\{#ConfigDirName}\server.toml');
309310
if not FileExists(ConfigFile) then
310311
Exit;
311-
if not LoadStringFromFile(ConfigFile, Contents) then
312+
// LoadStringFromFile's second parameter is `var S: AnsiString` — a var (by-ref)
313+
// parameter requires an EXACT type match in Pascal, so passing the plain `string`
314+
// (Unicode String, the Inno Setup 6 default) used everywhere else in this
315+
// procedure is a compile-time type mismatch. Load into a dedicated AnsiString,
316+
// then convert once.
317+
if not LoadStringFromFile(ConfigFile, RawContents) then
312318
Exit;
319+
Contents := String(RawContents);
313320
if Pos('__VOLUMES__', Contents) = 0 then
314321
Exit;
315322
VolumesPath := ExpandConstant('{commonappdata}\{#ConfigDirName}\Volumes');
316323
StringChangeEx(VolumesPath, '\', '/', True);
317324
StringChangeEx(Contents, '__VOLUMES__', VolumesPath, True);
318-
SaveStringToFile(ConfigFile, Contents, False);
325+
SaveStringToFile(ConfigFile, AnsiString(Contents), False);
319326
end;
320327
321328
// --- Wizard/step wiring ----------------------------------------------------

0 commit comments

Comments
 (0)