generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fail the go build early if go version is not compatible with go…
….mod file (#1292) Fixes issue #1184 Note: `TestGenerateAllTypes` in `build_kotlin_test.go` is failing on `main`. This PR touches the code for that but doesn't change any of the behavior or assertions so it will continue to fail. Tested manually as well: ``` $ ftl build highgoversion info:highgoversion: Building module ftl: error: go version "1.22.2" is not recent enough for this module, needs minimum version "9000.1.1" ```
- Loading branch information
Showing
9 changed files
with
274 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module = "highgoversion" | ||
language = "go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
module ftl/highgoversion | ||
|
||
go 9000.1.1 | ||
|
||
require github.com/TBD54566975/ftl v0.177.1 | ||
|
||
require ( | ||
connectrpc.com/connect v1.16.0 // indirect | ||
connectrpc.com/grpcreflect v1.2.0 // indirect | ||
connectrpc.com/otelconnect v0.7.0 // indirect | ||
github.com/BurntSushi/toml v1.3.2 // indirect | ||
github.com/TBD54566975/scaffolder v0.8.0 // indirect | ||
github.com/alecthomas/concurrency v0.0.2 // indirect | ||
github.com/alecthomas/kong v0.9.0 // indirect | ||
github.com/alecthomas/participle/v2 v2.1.1 // indirect | ||
github.com/alecthomas/types v0.14.0 // indirect | ||
github.com/alessio/shellescape v1.4.2 // indirect | ||
github.com/danieljoos/wincred v1.2.0 // indirect | ||
github.com/go-logr/logr v1.4.1 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
github.com/godbus/dbus/v5 v5.1.0 // indirect | ||
github.com/jackc/pgpassfile v1.0.0 // indirect | ||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect | ||
github.com/jackc/pgx/v5 v5.5.5 // indirect | ||
github.com/jackc/puddle/v2 v2.2.1 // indirect | ||
github.com/jpillora/backoff v1.0.0 // indirect | ||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // indirect | ||
github.com/multiformats/go-base36 v0.2.0 // indirect | ||
github.com/swaggest/jsonschema-go v0.3.70 // indirect | ||
github.com/swaggest/refl v1.3.0 // indirect | ||
github.com/zalando/go-keyring v0.2.4 // indirect | ||
go.opentelemetry.io/otel v1.25.0 // indirect | ||
go.opentelemetry.io/otel/metric v1.25.0 // indirect | ||
go.opentelemetry.io/otel/trace v1.25.0 // indirect | ||
golang.org/x/crypto v0.22.0 // indirect | ||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect | ||
golang.org/x/mod v0.17.0 // indirect | ||
golang.org/x/net v0.24.0 // indirect | ||
golang.org/x/sync v0.7.0 // indirect | ||
golang.org/x/sys v0.19.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
google.golang.org/protobuf v1.33.0 // indirect | ||
) | ||
|
||
replace github.com/TBD54566975/ftl => /Users/dli/Development/ftl |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
buildengine/testdata/projects/highgoversion/highgoversion.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package highgoversion | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/TBD54566975/ftl/go-runtime/ftl" // Import the FTL SDK. | ||
) | ||
|
||
type EchoRequest struct { | ||
Name ftl.Option[string] `json:"name"` | ||
} | ||
|
||
type EchoResponse struct { | ||
Message string `json:"message"` | ||
} | ||
|
||
//ftl:export | ||
func Echo(ctx context.Context, req EchoRequest) (EchoResponse, error) { | ||
return EchoResponse{Message: fmt.Sprintf("Hello, %s!", req.Name.Default("anonymous"))}, nil | ||
} |
Oops, something went wrong.