~bigbes/sourcehut-dolt

ref: 6efd2748c1c096073689f81cd4cde9829e82532c sourcehut-dolt/internal/smoke/smoke.go -rw-r--r-- 2.1 KiB
6efd2748 — Eugene Blikh db: postgres layer for repos, ACLs, dolt keys a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Package smoke is a throwaway build-and-resolve smoke test for Phase 0. It
// imports every third-party package the project will depend on and references
// one exported symbol from each, so that `go build ./...` populates go.sum and
// proves the whole dependency set (core-go, dolthub/dolt, grpc, chi, pq, brant,
// logrus, go-jose) resolves and compiles together — including the CGO (gozstd)
// pieces of dolt.
//
// DELETE THIS PACKAGE in the final phase (Phase 3); it exists only to pin and
// verify the dependency graph and has no runtime purpose.
package smoke

import (
	"git.sr.ht/~bitfehler/brant"
	"git.sr.ht/~sircmpwn/core-go/auth"
	"git.sr.ht/~sircmpwn/core-go/config"
	"git.sr.ht/~sircmpwn/core-go/crypto"
	"git.sr.ht/~sircmpwn/core-go/database"
	"git.sr.ht/~sircmpwn/core-go/server"
	"github.com/dolthub/dolt/go/libraries/doltcore/creds"
	"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
	"github.com/dolthub/dolt/go/libraries/doltcore/remotesrv"
	"github.com/dolthub/dolt/go/libraries/utils/earl"
	"github.com/dolthub/dolt/go/libraries/utils/filesys"
	"github.com/dolthub/dolt/go/store/nbs"
	"github.com/dolthub/dolt/go/store/types"
	"github.com/go-chi/chi/v5"
	_ "github.com/lib/pq" // registers the "postgres" database/sql driver
	"github.com/sirupsen/logrus"
	"google.golang.org/grpc"
	jose "gopkg.in/go-jose/go-jose.v2"

	remotesapi "github.com/dolthub/dolt/go/gen/proto/dolt/services/remotesapi/v1alpha1"
)

// refs pins one exported symbol from each key package. The values are never
// used; the point is that the compiler resolves the identifiers.
var refs = []any{
	// core-go
	server.New,
	auth.DecodeBearerToken,
	config.LoadConfig,
	crypto.InitCrypto,
	database.Middleware,
	// dolthub/dolt
	remotesrv.NewServer,
	doltdb.LoadDoltDB,
	nbs.NewUnlimitedMemQuotaProvider,
	earl.FileUrlFromPath,
	creds.PubKeyToKIDStr,
	filesys.LocalFS,
	types.Format_DOLT,
	remotesapi.PushConcurrencyControl_PUSH_CONCURRENCY_CONTROL_IGNORE_WORKING_SET,
	// transport / web / db / migrations / logging / jose
	grpc.NewServer,
	chi.NewRouter,
	brant.NewProvider,
	logrus.New,
	jose.NewSigner,
}