GeezerVison is showing github.com — pkgs/identity builds only with -tags sqlite|libsql and nothing in CI says so — plain go build fails on 3 undefined symbols · Issue #340 · developing-today/code
pkgs/identity builds only with -tags sqlite|libsql and nothing in CI says so — plain go build fails on 3 undefined symbols #340
Description
What
pkgs/identity cannot be built without a build tag. A plain go build ./... fails:
# github.com/charmbracelet/charm/server/db/sqlite/migration
…/server/db/sqlite/migration/migration.go:15:2: undefined: Migration0003_DT_Passwords_And_Keys
…/server/db/sqlite/migration/migration.go:18:2: undefined: Migration0005_AlterReduceNull
…/server/db/sqlite/migration/migration.go:19:2: undefined: Migration0006_Files
Verified on origin/main 556d084c (Go 1.25.1).
Why it fails
The module replaces github.com/charmbracelet/charm with the fork
github.com/developing-today-forks/charm v0.12.7-0.20240623052414-4e00e033848b
(pkgs/identity/go.mod:37). That fork's migration variants are behind
//go:build sqlite / //go:build libsql tags
(0003_password_sqlite.go, 0003_password_libsql.go, 0006_files_*_*.go), and
migration.go references the symbols unconditionally. With no tag, none of the
variants compile and the error names only the dependency internals — nothing
points at the missing tag.
Discovery problem
- The tag requirement is documented nowhere in the module:
pkgs/identity/README.md
is 4 lines and says nothing about building; main.go has no tag reference.
- The only build scripts that get it right are the PowerShell helpers
build-sqlite.ps1:133-138 and build-libsql.ps1:129-134, which derive the tag
from the script filename. A Linux/CI developer running plain go build gets the
cryptic failure.
- Nothing builds
pkgs/identity in CI: no workflow references the directory, and
mod-tidy.yml does not cover it. A future change that breaks one tagged variant
would rot silently.
What works
go build -tags sqlite ./..., go build -tags libsql ./..., and
go vet -tags sqlite ./... all pass on the same commit — the module is healthy
when tagged. The gap is documentation + CI coverage, not a broken module.
Suggested fix
- A CI workflow mirroring
map-build.yml (fix(map): upgrade keygen to v0.5.1 so pkgs/map builds again #339): on pkgs/identity/** changes,
run go build and go vet with -tags sqlite AND -tags libsql.
- A short build note in
pkgs/identity/README.md stating the required tag and
what each variant selects.
- Upstream (fork) follow-up, not in this repo: default one migration variant (or
a compile-time error in migration.go naming the missing tag) so the plain
build error is no longer misleading.
Acceptance
- CI workflow runs
go build + go vet for both tags on any pkgs/identity
change and is green.
- README names the tag requirement.
- The fork-side fix is tracked separately if pursued; not required here.
Metadata
Metadata
Development
No branches or pull requestsIssue actions