Skip to content

fix(querylog): exclude sqlite on Solaris and illumos - #2242

Merged
0xERR0R merged 5 commits into
0xERR0R:mainfrom
drscream:fix/illumos-build
Sep 5, 2026
Merged

fix(querylog): exclude sqlite on Solaris and illumos#2242
0xERR0R merged 5 commits into
0xERR0R:mainfrom
drscream:fix/illumos-build

Conversation

@drscream

Copy link
Copy Markdown
Contributor

At the moment there is no pure-Go driver for SQLite available on illumos. For that reason disable it.

At the moment there is no pure-Go driver for SQLite available on
illumos. For that reason disable it.
@0xERR0R 0xERR0R added the 🐞 bug Something isn't working label Sep 5, 2026
@0xERR0R 0xERR0R added this to the v0.35.0 milestone Sep 5, 2026
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.99%. Comparing base (831c443) to head (6b871d8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2242      +/-   ##
==========================================
- Coverage   88.03%   87.99%   -0.05%     
==========================================
  Files         126      126              
  Lines        9939     9939              
==========================================
- Hits         8750     8746       -4     
- Misses        924      927       +3     
- Partials      265      266       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

53cfbda (0xERR0R#2123) excluded linux/loong64 from the SQLite query log because the
pure-Go driver chain (modernc.org/sqlite -> modernc.org/libc) ships no generated
code for it, but it only updated the two implementation files.

database_writer_test.go imports github.com/glebarez/sqlite directly and carries
its own copy of the constraint, which was left untouched. As a result the test
binary still pulls in the driver and fails to compile:

    $ GOOS=linux GOARCH=loong64 go vet ./querylog/
    package github.com/0xERR0R/blocky/querylog (test)
        imports github.com/glebarez/sqlite
        imports modernc.org/libc/errno: build constraints exclude all Go files

Add the missing loong64 term so the three constraints stay in sync.

Claude-Session: https://claude.ai/code/session_01X2Dg33aFoCW4AvWQasX5rX
The illumos exclusion added in the parent commit is correct but narrower than
it needs to be. modernc.org/sqlite ships no generated code for Solaris at all
(there is no capi_solaris_*.go / sqlite_solaris_*.go, and modernc.org/libc has
no solaris port either), so GOOS=solaris fails exactly like GOOS=illumos:

    $ GOOS=solaris GOARCH=amd64 go build ./...
    imports modernc.org/libc/errno: build constraints exclude all Go files

Go satisfies the solaris build tag for GOOS=illumos as well, so a single
solaris term covers both platforms. Widen the constraint instead of listing
illumos separately, and apply it to database_writer_test.go too, which imports
github.com/glebarez/sqlite directly and would otherwise still fail to compile
under go vet / go test on those platforms.

Verified per platform that exactly one of the two implementation files is
selected (real driver on linux/amd64, stub on illumos and solaris), that
build + vet are clean on illumos, solaris, linux/mips, linux/loong64 and every
current release target, and that go test ./querylog/ still passes natively.

Claude-Session: https://claude.ai/code/session_01X2Dg33aFoCW4AvWQasX5rX
@0xERR0R

0xERR0R commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Thanks! Reproduced the build failure and confirmed the fix — modernc.org/libc has no illumos port, so the driver chain cannot compile there.

I pushed three follow-ups to your branch:

  • fac9b20database_writer_test.go carries its own copy of the constraint and was missed by fix(querylog): add loong64 to unsupported list #2123, so go vet ./querylog/ still failed on linux/loong64. Pre-existing, unrelated to your change.
  • d8e0e90 — widened illumos to solaris. modernc.org/sqlite has no Solaris port either, and Go satisfies the solaris build tag for GOOS=illumos as well, so one term covers both platforms. Applied to the test file too.
  • 487a0d7 — brought the platform list in docs/configuration.md in line with the build constraint.

Verified build + vet clean on illumos, solaris, linux/mips, linux/loong64 and every current release target, with exactly one of the two implementation files selected per platform.

The note listing where the sqlite target is unavailable was incomplete: it
never picked up loong64 from 0xERR0R#2123, did not mention Solaris/illumos, and
omitted the mips/mipsle variants of the BSD release targets.

Restate it as the actual rule behind the build constraint and then give the
affected official release builds. Verified against `go list` on every target
in .goreleaser.yml that exactly these eleven select the stub, and that all
remaining ones keep the real driver.

Claude-Session: https://claude.ai/code/session_01X2Dg33aFoCW4AvWQasX5rX
@0xERR0R 0xERR0R changed the title fix: build on illumos based distributions fix(querylog): exclude sqlite on Solaris and illumos Sep 5, 2026
@0xERR0R
0xERR0R enabled auto-merge (squash) September 5, 2026 15:20
@0xERR0R
0xERR0R merged commit a0cee0a into 0xERR0R:main Sep 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants