feat: goffi v0.6.0 — ADR-049 three-tier FFI error handling#249
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…(v0.30.17) Migrate all 764 ffi.CallFunction call sites (19 files) to handle goffi v0.6.0 (syscall.Errno, error) return signature. Three-tier error handling per ADR-049: - Tier 1 (creation/submit): check FFI error + API result (322 calls) - Tier 2 (void/hot path): infallible by GPU API contract (475 calls) - Tier 3 (platform syscalls): errno for diagnostics (5 Wayland calls) Wayland blit: wl_display_flush and wl_display_roundtrip_queue now capture errno — EAGAIN (compositor backpressure) vs EPIPE (compositor dead). Qt6/SDL3/GTK4 reference pattern. Fix vk-gen: output path, build tag, auto-gofmt via go/format. Remove stale cmd/hal/ artifact.
eda98d4 to
c55b970
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CallFunctionreturns(syscall.Errno, error))_, err :=— check FFI error + API result (322 calls)_, _ =— infallible by GPU API contract (475 calls)errno, _ :=— capture errno for diagnostics (5 Wayland calls)wl_display_flush/wl_display_roundtrip_queue: EAGAIN vs EPIPE (Qt6/SDL3 pattern)../../hal/, add//go:build !(js && wasm)to templatecmd/hal/artifact from wrong generator pathEnterprise references
()for all draw/destroy/barrier (infallible by spec)qwaylanddisplay.cpp: errno check afterwl_display_flushSDL_waylandevents.c: same patternFFI-ERROR-HANDLING-ENTERPRISE-RESEARCH.md,FFI-ERRNO-USEFULNESS-ANALYSIS.mdTest plan
go build ./...— Windows, Linux, macOSgo test ./...— 15/15 packages passgolangci-lint run— 0 issues_ = ffi.CallFunctionremaining