Files
zeekayandHanzo Dev fadcec94ad fix(crypto): make the luxcpp-linked package opt-in so the cgo test leg can pass
The `test (1)` leg of the CI matrix failed on ONE package and reported the whole
leg red:

    # [pkg-config --cflags -- lux-crypto lux-gpu lux-lattice]
    Package lux-crypto was not found in the pkg-config search path.
    FAIL github.com/luxfi/crypto/cgo [build failed]

Measured against the run log, crypto/cgo is the ONLY package that fails there --
blake3, poseidon2, kem and bindings/cabi all build on the runner. So every other
test in the repo, including everything the race detector was meant to cover, was
being reported red for this one package.

It cannot just be installed. luxfi/luxcpp publishes NO releases, so accel's
`make fetch-deps` -- the in-org precedent -- has nothing to download, and accel's
own CI consequently runs its Go tests with CGO_ENABLED=0. Requiring artifacts
that are not published would keep this leg permanently red.

So the package moves behind `//go:build cgo && luxcpp`. It exports nothing and
nothing in the repo imports it, so gating it costs no coverage; whoever has the
C++ artifacts builds it with `-tags luxcpp`.

Verified both directions:

    PKG_CONFIG_PATH=/nonexistent CGO_ENABLED=1 go build ./...  OK   (failed before)
    PKG_CONFIG_PATH=/nonexistent CGO_ENABLED=1 go vet   ./...  OK
    CGO_ENABLED=1 go build -tags luxcpp ./cgo/                 OK   (luxcpp present)
    gofmt -s -l .                                              clean

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-02 03:25:09 -07:00
..