Repository navigation
A native main for gallery and gallery/iso, and a CI step that builds without tags - #78
Merged
Merged
Conversation
…without tags Both are package main with their main behind a build tag (js && wasm, and gallerynative for the root), so on a native host with no tag go build ./... failed to link: "function main is undeclared in the main package". go test supplies its own main and passed, and CI built the root only for js/wasm and with gallerynative, so nothing said so. Two empty stubs (no statement, so the coverage gate is unchanged at 100.0%) and a native go build ./... step, which fails without the stubs and passes with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Defect. On a native host,
go build ./...fails:and, once iso is fixed, the same for the root package. Both are
package mainwith theirmainbehind a tag:js && wasmfor both, andgallerynativetoo for the root.go testprovides its ownmain, so the tests passed. CI built the root only for js/wasm and withgallerynative, and iso only for js/wasm, so nothing caught it.Change.
stub_main.go(!(js && wasm) && !gallerynative) andiso/native.go(!(js && wasm)): an emptyfunc main() {}, the app-template convention. The body holds no statement, so the coverage gate doesn't move (100.0% before and after).go build ./...step, native and with no tags, that would have caught it. Control: without the two stubs it fails (rc=1); with them it passes.Checked locally (go1.27.2): native build;
GOOS=js GOARCH=wasmfor.and./iso;-tags gallerynative; vet; tests at 100.0%; linux on the 6 architectures; actionlint clean.🤖 Generated with Claude Code