Skip to content

fix(synkronus-cli): generate architecture-specific Windows resources - #1044

Merged
najuna-brian merged 4 commits into
OpenDataEnsemble:devfrom
Grace256c:fix/1025-windows-resource-generation
Nov 9, 2026
Merged

najuna-brian merged 4 commits into
OpenDataEnsemble:devfrom
Grace256c:fix/1025-windows-resource-generation

Conversation

@Grace256c

@Grace256c Grace256c commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What & Why

Fix Windows CLI builds failing on the committed resource_windows_amd64.syso.

The tracked resource file was named for AMD64 but actually contained an i386 COFF object. Renaming the file did not change its internal architecture, which caused the linker error:

unknown relocation type 7

This change removes the precompiled architecture-dependent resource and generates the correct Windows resource during CI/release builds using pinned goversioninfo@v1.5.0.

Windows resources are now generated explicitly for:

  • AMD64 using -64
  • ARM64 using -64 -arm

The generated resources use the current versioninfo.json metadata and preserve the existing Windows icon.

The failure was also reproduced with Go 1.26.8, so the underlying issue is the architecture mismatch rather than a Go 1.27-only regression.

Documentation was updated to describe the architecture-specific generation process and remove stale server resource instructions.

Closes #1025.

Type of Change

  • Bug fix
  • New feature / enhancement
  • Refactor / cleanup
  • Documentation
  • Chore / other

Component(s) Changed

  • formulus (React Native mobile app)
  • formulus-formplayer (form WebView UI)
  • synkronus (Go backend)
  • synkronus-cli (command-line client)
  • synkronus-portal (web admin UI)
  • desktop (Tauri app)
  • packages (tokens / components)
  • Documentation / DevOps / CI

Testing

  • Added/updated tests
  • Manually tested
  • Not applicable

Verification included:

  • go mod verify
  • go vet -mod=readonly ./...
  • go test -mod=readonly -race ./...
  • Linux AMD64 build
  • Windows AMD64 build
  • Windows ARM64 build
  • macOS AMD64 build
  • Windows AMD64 and ARM64 builds with Go 1.26.8 and Go 1.27.2
  • Verified generated COFF machine values:
    • AMD64: 0x8664
    • ARM64: 0xaa64
  • Verified linked Windows executables contain current OpenDataEnsemble metadata and version 1.4.0.0
  • Verified existing icon resources are preserved
  • Verified Synkronus server Windows AMD64 cross-build still succeeds
  • actionlint
  • workflow YAML parsing
  • git diff --check

Native Windows execution was not performed locally; Windows behavior is covered through cross-build verification and CI workflow changes.

Checklist

  • Pre-flight checks for changed packages passed (lint / format / tests)
  • Breaking changes (if any) have migration steps
  • Related issue linked, e.g. Closes #123

Review follow-up

The CLI workflow was normalized from CRLF to LF while editing; this normalization has no behavioral effect.

Following review feedback, this PR also:

  • scopes generated *.syso files to synkronus-cli/.gitignore;
  • derives Windows release FileVersion/ProductVersion metadata from the GitHub release tag;
  • preserves prerelease strings such as 1.4.0-alpha.2 while using the valid numeric Windows version 1.4.0.0.

@najuna-brian najuna-brian moved this from Triage to Ready in ODE Community Board Nov 8, 2026
@najuna-brian najuna-brian moved this from Ready to In progress in ODE Community Board Nov 8, 2026
@najuna-brian najuna-brian moved this from In progress to In review in ODE Community Board Nov 8, 2026

@najuna-brian najuna-brian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, correct root-cause fix, and adding Windows to the PR matrix will catch regressions.

may be some Non-blocking:
(1) note the CRLF→LF normalization in the description since it makes the workflow diff look like a full rewrite;
(2) consider passing the release tag into goversioninfo so Windows file properties don’t always say 1.4.0.0;
(3) *.syso could live in synkronus-cli/.gitignore instead of root.

@github-project-automation github-project-automation Bot moved this from In review to In progress in ODE Community Board Nov 8, 2026
@Grace256c

Copy link
Copy Markdown
Contributor Author

Hello @najuna-brian i have managed to make the suggested improvements, could you please review when you get a minute. Thank you

@najuna-brian
najuna-brian self-requested a review November 9, 2026 10:26

@najuna-brian najuna-brian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Grace256c
Nicely done

@najuna-brian
najuna-brian merged commit 648b7e1 into OpenDataEnsemble:dev Nov 9, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in ODE Community Board Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[synkronus-cli] Windows build fails with Go 1.27 on the committed resource_windows_amd64.syso

2 participants