Skip to content

internal/fakecgo: compilation error for old Go - #487

Closed
hajimehoshi wants to merge 1 commit into
ebitengine:0.10from
hajimehoshi:compile
Closed

internal/fakecgo: compilation error for old Go#487
hajimehoshi wants to merge 1 commit into
ebitengine:0.10from
hajimehoshi:compile

Conversation

@hajimehoshi

@hajimehoshi hajimehoshi commented Jul 31, 2026

Copy link
Copy Markdown
Member

What issue is this addressing?

Updates #485

What type of issue is this addressing?

bug

What this PR does | solves

Fixes a compilation error for old Go where range over integers is not available.

PureGo 0.10 needs to support Go 1.18 where range over integers is not
available. This change fixes this.

Updates ebitengine#485
@hajimehoshi

Copy link
Copy Markdown
Member Author

The target is 0.10 branch, not main. PTAL

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a compilation error on older Go toolchains by removing the newer “range over integer” loop form from internal/fakecgo’s threadentry regression test, keeping the test runnable across supported Go versions.

Changes:

  • Replace for range rounds {} with a classic indexed for i := 0; i < rounds; i++ {} loop.
  • Replace for range workers {} with a classic indexed for j := 0; j < workers; j++ {} loop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TotallyGamerJet TotallyGamerJet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@hajimehoshi

Copy link
Copy Markdown
Member Author

=== RUN TestThreadEntryReturn
signal: segmentation fault (core dumped)

Hmm, this might be related to changes in main that are not in 0.10. That's unfortunate, but I'll revert the cherry-picking the fix for #485.

@hajimehoshi
hajimehoshi deleted the compile branch July 31, 2026 13:35
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.

3 participants