mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-13 03:37:28 -06:00
bump to modernc.org/sqlite v1.29.7 (#2850)
This commit is contained in:
parent
c67bbe5ba0
commit
b3f2d44143
120 changed files with 631479 additions and 58069 deletions
43
vendor/golang.org/x/tools/internal/versions/features.go
generated
vendored
Normal file
43
vendor/golang.org/x/tools/internal/versions/features.go
generated
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2023 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package versions
|
||||
|
||||
// This file contains predicates for working with file versions to
|
||||
// decide when a tool should consider a language feature enabled.
|
||||
|
||||
// GoVersions that features in x/tools can be gated to.
|
||||
const (
|
||||
Go1_18 = "go1.18"
|
||||
Go1_19 = "go1.19"
|
||||
Go1_20 = "go1.20"
|
||||
Go1_21 = "go1.21"
|
||||
Go1_22 = "go1.22"
|
||||
)
|
||||
|
||||
// Future is an invalid unknown Go version sometime in the future.
|
||||
// Do not use directly with Compare.
|
||||
const Future = ""
|
||||
|
||||
// AtLeast reports whether the file version v comes after a Go release.
|
||||
//
|
||||
// Use this predicate to enable a behavior once a certain Go release
|
||||
// has happened (and stays enabled in the future).
|
||||
func AtLeast(v, release string) bool {
|
||||
if v == Future {
|
||||
return true // an unknown future version is always after y.
|
||||
}
|
||||
return Compare(Lang(v), Lang(release)) >= 0
|
||||
}
|
||||
|
||||
// Before reports whether the file version v is strictly before a Go release.
|
||||
//
|
||||
// Use this predicate to disable a behavior once a certain Go release
|
||||
// has happened (and stays enabled in the future).
|
||||
func Before(v, release string) bool {
|
||||
if v == Future {
|
||||
return false // an unknown future version happens after y.
|
||||
}
|
||||
return Compare(Lang(v), Lang(release)) < 0
|
||||
}
|
||||
14
vendor/golang.org/x/tools/internal/versions/toolchain.go
generated
vendored
Normal file
14
vendor/golang.org/x/tools/internal/versions/toolchain.go
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package versions
|
||||
|
||||
// toolchain is maximum version (<1.22) that the go toolchain used
|
||||
// to build the current tool is known to support.
|
||||
//
|
||||
// When a tool is built with >=1.22, the value of toolchain is unused.
|
||||
//
|
||||
// x/tools does not support building with go <1.18. So we take this
|
||||
// as the minimum possible maximum.
|
||||
var toolchain string = Go1_18
|
||||
14
vendor/golang.org/x/tools/internal/versions/toolchain_go119.go
generated
vendored
Normal file
14
vendor/golang.org/x/tools/internal/versions/toolchain_go119.go
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.19
|
||||
// +build go1.19
|
||||
|
||||
package versions
|
||||
|
||||
func init() {
|
||||
if Compare(toolchain, Go1_19) < 0 {
|
||||
toolchain = Go1_19
|
||||
}
|
||||
}
|
||||
14
vendor/golang.org/x/tools/internal/versions/toolchain_go120.go
generated
vendored
Normal file
14
vendor/golang.org/x/tools/internal/versions/toolchain_go120.go
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.20
|
||||
// +build go1.20
|
||||
|
||||
package versions
|
||||
|
||||
func init() {
|
||||
if Compare(toolchain, Go1_20) < 0 {
|
||||
toolchain = Go1_20
|
||||
}
|
||||
}
|
||||
14
vendor/golang.org/x/tools/internal/versions/toolchain_go121.go
generated
vendored
Normal file
14
vendor/golang.org/x/tools/internal/versions/toolchain_go121.go
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.21
|
||||
// +build go1.21
|
||||
|
||||
package versions
|
||||
|
||||
func init() {
|
||||
if Compare(toolchain, Go1_21) < 0 {
|
||||
toolchain = Go1_21
|
||||
}
|
||||
}
|
||||
18
vendor/golang.org/x/tools/internal/versions/types_go121.go
generated
vendored
18
vendor/golang.org/x/tools/internal/versions/types_go121.go
generated
vendored
|
|
@ -12,9 +12,19 @@ import (
|
|||
"go/types"
|
||||
)
|
||||
|
||||
// FileVersions always reports the a file's Go version as the
|
||||
// zero version at this Go version.
|
||||
func FileVersions(info *types.Info, file *ast.File) string { return "" }
|
||||
// FileVersion returns a language version (<=1.21) derived from runtime.Version()
|
||||
// or an unknown future version.
|
||||
func FileVersion(info *types.Info, file *ast.File) string {
|
||||
// In x/tools built with Go <= 1.21, we do not have Info.FileVersions
|
||||
// available. We use a go version derived from the toolchain used to
|
||||
// compile the tool by default.
|
||||
// This will be <= go1.21. We take this as the maximum version that
|
||||
// this tool can support.
|
||||
//
|
||||
// There are no features currently in x/tools that need to tell fine grained
|
||||
// differences for versions <1.22.
|
||||
return toolchain
|
||||
}
|
||||
|
||||
// InitFileVersions is a noop at this Go version.
|
||||
// InitFileVersions is a noop when compiled with this Go version.
|
||||
func InitFileVersions(*types.Info) {}
|
||||
|
|
|
|||
25
vendor/golang.org/x/tools/internal/versions/types_go122.go
generated
vendored
25
vendor/golang.org/x/tools/internal/versions/types_go122.go
generated
vendored
|
|
@ -12,10 +12,27 @@ import (
|
|||
"go/types"
|
||||
)
|
||||
|
||||
// FileVersions maps a file to the file's semantic Go version.
|
||||
// The reported version is the zero version if a version cannot be determined.
|
||||
func FileVersions(info *types.Info, file *ast.File) string {
|
||||
return info.FileVersions[file]
|
||||
// FileVersions returns a file's Go version.
|
||||
// The reported version is an unknown Future version if a
|
||||
// version cannot be determined.
|
||||
func FileVersion(info *types.Info, file *ast.File) string {
|
||||
// In tools built with Go >= 1.22, the Go version of a file
|
||||
// follow a cascades of sources:
|
||||
// 1) types.Info.FileVersion, which follows the cascade:
|
||||
// 1.a) file version (ast.File.GoVersion),
|
||||
// 1.b) the package version (types.Config.GoVersion), or
|
||||
// 2) is some unknown Future version.
|
||||
//
|
||||
// File versions require a valid package version to be provided to types
|
||||
// in Config.GoVersion. Config.GoVersion is either from the package's module
|
||||
// or the toolchain (go run). This value should be provided by go/packages
|
||||
// or unitchecker.Config.GoVersion.
|
||||
if v := info.FileVersions[file]; IsValid(v) {
|
||||
return v
|
||||
}
|
||||
// Note: we could instead return runtime.Version() [if valid].
|
||||
// This would act as a max version on what a tool can support.
|
||||
return Future
|
||||
}
|
||||
|
||||
// InitFileVersions initializes info to record Go versions for Go files.
|
||||
|
|
|
|||
5
vendor/golang.org/x/tools/internal/versions/versions.go
generated
vendored
5
vendor/golang.org/x/tools/internal/versions/versions.go
generated
vendored
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
package versions
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Note: If we use build tags to use go/versions when go >=1.22,
|
||||
// we run into go.dev/issue/53737. Under some operations users would see an
|
||||
// import of "go/versions" even if they would not compile the file.
|
||||
|
|
@ -45,6 +49,7 @@ func IsValid(x string) bool { return isValid(stripGo(x)) }
|
|||
// stripGo converts from a "go1.21" version to a "1.21" version.
|
||||
// If v does not start with "go", stripGo returns the empty string (a known invalid version).
|
||||
func stripGo(v string) string {
|
||||
v, _, _ = strings.Cut(v, "-") // strip -bigcorp suffix.
|
||||
if len(v) < 2 || v[:2] != "go" {
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue