You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 22da5c6
Browse filesBrowse the repository at this point in the historyBrowse files
fix: compile on every GOOS/GOARCH Go supports except plan9 (#829)
A type-check of every package and test for each of the 47 pairs in
`go tool dist list` found 31 that did not compile. 44 now do; android
and ios compile their library packages (they only link through cgo).
- Store gems (SQLite3, Sequel, ActiveRecord's adapter, Bolt, Bleve,
Etcd, Confd) are constrained to the targets modernc.org/sqlite v1.60.1
has a port for (its lib/ directory: darwin amd64/arm64, freebsd 4,
linux 8, netbsd/amd64, openbsd amd64/arm64, windows). Elsewhere
bindings_store_stub.go, generalised from the wasm stubs, keeps
`require` working and raises NotImplementedError "<gem> is not
supported on <goos/goarch>" on use ("on wasm" stays as it was).
classOfExtBinding's store cases moved to classOfStoreBinding so the
other bindings keep their classes on those targets.
- Errno: EMULTIHOP and ENOLINK join the per-target names (OpenBSD lacks
them), ENOTRECOVERABLE and EOWNERDEAD are undefined on NetBSD and
DragonFly; MRI's undefined_error treatment, as for js/wasm.
- Process::RLIMIT_*: AS, MEMLOCK, NPROC and RSS come from per-OS tables
(OpenBSD has no AS, AIX no MEMLOCK, Solaris/illumos only AS), as MRI
defines them #ifdef. Setrlimit stores through a generic setter: the
Rlimit fields are int64 on FreeBSD and DragonFly.
- flock: x/sys/unix instead of syscall (Solaris has no syscall.Flock);
on AIX, which has no flock(2), the fcntl(2) emulation of MRI's
missing/flock.c.
- Test-only servers: mysql_test.go also needs go-mysql-server's
sockstate (Linux, macOS, Windows, FreeBSD); nats_bind_internal_test.go
needs nats-server (not on AIX, nor FreeBSD 386/arm).
CI gains `compile on every target`, one job per GOOS: go vet for each
GOARCH, default and rbgo_core builds. plan9 stays out and the README
says why: no errno numbers, Kill, Flock, Getrlimit or Stat_t in its
syscall package, and four gem drivers that do not build there.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -775,6 +775,15 @@ Otherwise:
775
775
|**wasip1/wasm**| built with `CGO_ENABLED=0 GOOS=wasip1 GOARCH=wasm` and **run** under [wazero](https://wazero.io), a pure-Go runtime — verified here: `wazero run rbgo.wasm -e 'puts (1..10).sum'` prints `55`|
776
776
|**js/wasm (browser)**|`CGO_ENABLED=0 GOOS=js GOARCH=wasm go build ./...` plus `go vet` over `./cmd/wasm ./cmd/rbgo ./internal/vm`, then the playground module is **run** in node by `web/smoke.mjs` (`wasm (js, browser)` in `ci.yml`). Added with #684, which fixed the three `syscall` constants the `js` port does not define |
777
777
|**rbgo_core**|`go vet` and the `internal/vm` suite with `-tags rbgo_core`, then the core playground module is built for js/wasm, its size bounded, and **run** in node by `web/smoke.mjs --core` (`rbgo_core (core build)` in `ci.yml`). See [the `rbgo_core` build](#the-rbgo_core-build-the-language-and-the-numeric-stack-no-gems)|
778
+
|**every other target**|`go vet ./...`, default and `rbgo_core` builds, for **every GOOS/GOARCH pair `go tool dist list` names except plan9** — aix, android, darwin, dragonfly, freebsd, illumos, ios, js, linux (all 13 arches, mips and ppc64 included), netbsd, openbsd, solaris, wasip1, windows (`compile on every target` in `ci.yml`; android and ios link only through cgo, so their library packages are built instead). Compiling is all it checks there |
779
+
780
+
What a target lacks, rbgo leaves out the way MRI does:
781
+
782
+
-**The store gems** — SQLite3, Sequel, ActiveRecord's adapter, Bolt, Bleve, Etcd and Confd — need modernc.org/sqlite, which has a port for darwin/{amd64,arm64}, freebsd/{386,amd64,arm,arm64}, linux/{386,amd64,arm,arm64,loong64,ppc64le,riscv64,s390x}, netbsd/amd64, openbsd/{amd64,arm64} and windows. Elsewhere (wasm included) `require` still works and the modules exist, and the first real operation raises `NotImplementedError: sqlite3 is not supported on linux/mips64le` (or the gem and target in question).
783
+
-**Errno**: a name the system's `<errno.h>` lacks is still a constant, naming `Errno::NOERROR`, as MRI's `undefined_error` does: `EMULTIHOP` and `ENOLINK` on OpenBSD, `ENOTRECOVERABLE` and `EOWNERDEAD` on NetBSD and DragonFly.
784
+
-**`Process::RLIMIT_*`** exist only where the system has the resource: no `RLIMIT_AS` on OpenBSD, no `RLIMIT_MEMLOCK` on AIX, only `RLIMIT_AS` of the four optional ones on Solaris and illumos.
785
+
-**`File#flock`** and PStore's lock use `flock(2)`; AIX has none, so there it is emulated with `fcntl(2)` record locks, exactly as MRI's `missing/flock.c` does.
786
+
-**plan9 does not compile.** Its `syscall` package has no errno numbers (`syscall.EINVAL` is a string error there), no `Kill`, `Flock`, `Getrlimit` or `Stat_t`, and several gem drivers (nats, Kafka's franz-go, Thrift, gopher-lua) do not build for it; a port means a plan9 variant of rbgo's Errno, IO and Process layers.
778
787
779
788
**Not on the pull-request path** — validated on a nightly schedule instead:
780
789
`riscv64`, `loong64`, `ppc64le`, `s390x` and 32-bit `arm`, under QEMU
0 commit comments