Skip to content

fakecgo: add DO NOT EDIT comment to imported files#14

Merged
gdams merged 2 commits into
mainfrom
dev/gadams/fakecgo-generated-headers
May 27, 2026
Merged

fakecgo: add DO NOT EDIT comment to imported files#14
gdams merged 2 commits into
mainfrom
dev/gadams/fakecgo-generated-headers

Conversation

@gdams
Copy link
Copy Markdown
Member

@gdams gdams commented May 27, 2026

Update the update_tool.go to prepend a // Code generated by update_tool.go from ebitengine/purego; DO NOT EDIT. header to all files it downloads from purego. This follows the Go convention for generated files and makes it clear these files should not be manually edited.

Copilot AI review requested due to automatic review settings May 27, 2026 08:55
@gdams gdams requested a review from a team as a code owner May 27, 2026 08:55
@gdams gdams enabled auto-merge May 27, 2026 08:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the internal/fakecgo sync tooling and the synced files to clearly mark all ebitengine/purego-imported sources as generated, following Go’s “Code generated … DO NOT EDIT.” convention.

Changes:

  • Prepend // Code generated by update_tool.go from ebitengine/purego; DO NOT EDIT. to files downloaded from ebitengine/purego.
  • Add prependGeneratedHeader to update_tool.go and apply it during file updates.
  • Regenerate the imported internal/fakecgo sources to include the new header.
Show a summary per file
File Description
internal/fakecgo/update_tool.go Prepends a generated-file header to downloaded content before writing.
internal/fakecgo/ztrampolines_stubs.s Adds generated-file header to synced assembly stub.
internal/fakecgo/ztrampolines_linux.s Adds generated-file header to synced assembly.
internal/fakecgo/ztrampolines_freebsd.s Adds generated-file header to synced assembly.
internal/fakecgo/ztrampolines_darwin.s Adds generated-file header to synced assembly.
internal/fakecgo/zsymbols.go Adds generated-file header to synced Go source.
internal/fakecgo/zsymbols_linux.go Adds generated-file header to synced Go source.
internal/fakecgo/zsymbols_freebsd.go Adds generated-file header to synced Go source.
internal/fakecgo/zsymbols_darwin.go Adds generated-file header to synced Go source.
internal/fakecgo/trampolines_riscv64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_ppc64le.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_loong64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_riscv64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_ppc64le.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_loong64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_arm64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_arm.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_amd64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_linux_386.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_arm64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_arm.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_amd64.s Adds generated-file header to synced assembly.
internal/fakecgo/trampolines_386.s Adds generated-file header to synced assembly.
internal/fakecgo/setenv.go Adds generated-file header to synced Go source.
internal/fakecgo/linux.go Adds generated-file header to synced Go source.
internal/fakecgo/libcgo.go Adds generated-file header to synced Go source.
internal/fakecgo/libcgo_linux.go Adds generated-file header to synced Go source.
internal/fakecgo/libcgo_freebsd.go Adds generated-file header to synced Go source.
internal/fakecgo/libcgo_darwin.go Adds generated-file header to synced Go source.
internal/fakecgo/iscgo.go Adds generated-file header to synced Go source.
internal/fakecgo/go_util.go Adds generated-file header to synced Go source.
internal/fakecgo/go_setenv.go Adds generated-file header to synced Go source.
internal/fakecgo/go_linux.go Adds generated-file header to synced Go source.
internal/fakecgo/go_libinit.go Adds generated-file header to synced Go source.
internal/fakecgo/go_freebsd.go Adds generated-file header to synced Go source.
internal/fakecgo/go_darwin.go Adds generated-file header to synced Go source.
internal/fakecgo/freebsd.go Adds generated-file header to synced Go source.
internal/fakecgo/fakecgo.go Adds generated-file header to synced Go source.
internal/fakecgo/callbacks.go Adds generated-file header to synced Go source.
internal/fakecgo/asm_s390x.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_riscv64.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_ppc64le.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_loong64.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_arm64.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_arm.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_amd64.s Adds generated-file header to synced assembly.
internal/fakecgo/asm_386.s Adds generated-file header to synced assembly.
internal/fakecgo/abi_riscv64.h Adds generated-file header to synced header.
internal/fakecgo/abi_ppc64x.h Adds generated-file header to synced header.
internal/fakecgo/abi_loong64.h Adds generated-file header to synced header.
internal/fakecgo/abi_arm64.h Adds generated-file header to synced header.
internal/fakecgo/abi_amd64.h Adds generated-file header to synced header.

Copilot's findings

Tip

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

Files not reviewed (16)
  • internal/fakecgo/callbacks.go: Language not supported
  • internal/fakecgo/fakecgo.go: Language not supported
  • internal/fakecgo/freebsd.go: Language not supported
  • internal/fakecgo/go_darwin.go: Language not supported
  • internal/fakecgo/go_freebsd.go: Language not supported
  • internal/fakecgo/go_libinit.go: Language not supported
  • internal/fakecgo/go_linux.go: Language not supported
  • internal/fakecgo/go_setenv.go: Language not supported
  • internal/fakecgo/go_util.go: Language not supported
  • internal/fakecgo/iscgo.go: Language not supported
  • internal/fakecgo/libcgo.go: Language not supported
  • internal/fakecgo/libcgo_darwin.go: Language not supported
  • internal/fakecgo/libcgo_freebsd.go: Language not supported
  • internal/fakecgo/libcgo_linux.go: Language not supported
  • internal/fakecgo/linux.go: Language not supported
  • internal/fakecgo/setenv.go: Language not supported
  • Files reviewed: 36/52 changed files
  • Comments generated: 0

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Benchmark Results

⚠️ Issues detected — expand failed jobs below for details

ubuntu-22.04-go1.25-cgo1-ossl3.0.13 · results
ubuntu-22.04-go1.25-cgo1-ossl3.1.5 · results
ubuntu-22.04-go1.25-cgo1-ossl3.2.1 · results
ubuntu-22.04-go1.25-cgo1-ossl3.3.1 · results
ubuntu-22.04-go1.25-cgo1-ossl3.4.0 · results

ubuntu-22.04-go1.25-cgo1-ossl3.5.0

Regressions:

alloc regression: MLDSASign/87-4 [B/op] +0.04% (p=0.002)

📁 Full results

ubuntu-22.04-go1.26-cgo1-ossl3.0.13 · results
ubuntu-22.04-go1.26-cgo1-ossl3.1.5 · results
ubuntu-22.04-go1.26-cgo1-ossl3.2.1 · results
ubuntu-22.04-go1.26-cgo1-ossl3.3.1 · results
ubuntu-22.04-go1.26-cgo1-ossl3.4.0 · results
ubuntu-22.04-go1.26-cgo1-ossl3.5.0 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.0.13 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.1.5 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.2.1 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.3.1 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.4.0 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.5.0 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.0.13 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.1.5 · results

ubuntu-24.04-arm-go1.26-cgo1-ossl3.2.1

Regressions:

alloc regression: PBKDF2HMACSHA1-4 [B/op] +0.32% (p=0.035)
alloc regression: PBKDF2HMACSHA256-4 [B/op] +0.31% (p=0.004)

📁 Full results

ubuntu-24.04-arm-go1.26-cgo1-ossl3.3.1 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.4.0 · results

ubuntu-24.04-arm-go1.26-cgo1-ossl3.5.0

Regressions:

alloc regression: PBKDF2HMACSHA1-4 [B/op] +0.16% (p=0.033)

📁 Full results

ubuntu-latest-go1.25-cgo1-azl3 · results
ubuntu-latest-go1.26-cgo1-azl3 · results

@gdams gdams merged commit e83ad93 into main May 27, 2026
111 of 114 checks passed
@gdams gdams deleted the dev/gadams/fakecgo-generated-headers branch May 27, 2026 14:01
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