Skip to content

Commit 03ba59b

Browse files
committed
link ack-runtime with code-generator via go.mod
Even though Go code in the code-generator doesn't actually import the ack-runtime library (github.com/aws-controllers-k8s/runtime), the templates contained in the code-generator *do* produce Go code that imports the ack-runtime. So, in order to fake out a Go module dependency between the code-generator and the ack-runtime, I've added a simple test file in pkg/generate/ack/runtime_test.go that effectively couples the ack-runtime library at v0.0.3. When we make changes in the ack-runtime that break backwards compatibility, we can now update the SemVer in the ack-runtime repo and the commits to the code-generator that change the produced Go code that follows the new interfaces in ack-runtime can update the depended-on ack-runtime version in the code-generator repository's go.mod file.
1 parent fe3ed9d commit 03ba59b

File tree

3 files changed

+371
-52
lines changed

3 files changed

+371
-52
lines changed

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ module github.com/aws-controllers-k8s/code-generator
33
go 1.14
44

55
require (
6-
github.com/aws/aws-sdk-go v1.35.5
6+
github.com/aws-controllers-k8s/runtime v0.0.3
7+
github.com/aws/aws-sdk-go v1.37.4
78
github.com/dlclark/regexp2 v1.4.0
89
// pin to v0.1.1 due to release problem with v0.1.2
910
github.com/gertd/go-pluralize v0.1.1
@@ -14,5 +15,5 @@ require (
1415
github.com/spf13/cobra v1.1.1
1516
github.com/stretchr/testify v1.7.0
1617
golang.org/x/mod v0.4.1
17-
k8s.io/apimachinery v0.20.2
18+
k8s.io/apimachinery v0.18.6
1819
)

0 commit comments

Comments
 (0)