diff --git a/storage/default-dir-piece-completion-boltdb.go b/storage/default-dir-piece-completion-boltdb.go index 5573fc8d..3ac6a77d 100644 --- a/storage/default-dir-piece-completion-boltdb.go +++ b/storage/default-dir-piece-completion-boltdb.go @@ -1,7 +1,8 @@ // Bolt piece completion is available, and sqlite is not. -//go:build !noboltdb && (!cgo || nosqlite) +//go:build !noboltdb && (!cgo || nosqlite) && !wasm // +build !noboltdb // +build !cgo nosqlite +// +build !wasm package storage diff --git a/storage/default-dir-piece-completion-other.go b/storage/default-dir-piece-completion-other.go index a0564bf4..3cd42fb7 100644 --- a/storage/default-dir-piece-completion-other.go +++ b/storage/default-dir-piece-completion-other.go @@ -1,7 +1,7 @@ // Bolt piece completion is not available, and neither is sqlite. -//go:build (!cgo || nosqlite) && noboltdb +//go:build (!cgo || nosqlite) && (noboltdb || wasm) // +build !cgo nosqlite -// +build noboltdb +// +build noboltdb wasm package storage diff --git a/storage/sqlite-piece-completion.go b/storage/sqlite-piece-completion.go index 153e51e7..eb2e1c3d 100644 --- a/storage/sqlite-piece-completion.go +++ b/storage/sqlite-piece-completion.go @@ -1,5 +1,6 @@ // modernc.org/sqlite depends on modernc.org/libc which doesn't work for JS (and probably wasm but I // think JS is the stronger signal). + //go:build cgo && !nosqlite // +build cgo,!nosqlite diff --git a/storage/sqlite/deprecated.go b/storage/sqlite/deprecated.go index a1b1df14..47698ef0 100644 --- a/storage/sqlite/deprecated.go +++ b/storage/sqlite/deprecated.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package sqliteStorage import ( diff --git a/storage/sqlite/direct.go b/storage/sqlite/direct.go index 4256996a..3d51fd31 100644 --- a/storage/sqlite/direct.go +++ b/storage/sqlite/direct.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package sqliteStorage import (