Skip to content

Commit 09f8dd1

Browse files
authored
Fix codegen build tags to be used in all cases not just main files (aws#891)
1 parent 1b2abe8 commit 09f8dd1

27 files changed

+45
-20
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,15 @@ gen-endpoints:
4747

4848
build:
4949
@echo "go build SDK and vendor packages"
50-
@go build ${SDK_ONLY_PKGS}
51-
@go build -tags example ./example/...
50+
@go build -tags example,codegen ${SDK_ONLY_PKGS}
5251

5352
unit: get-deps-tests build verify
5453
@echo "go test SDK and vendor packages"
55-
@go test $(SDK_ONLY_PKGS)
54+
@go test -tags example,codegen $(SDK_ONLY_PKGS)
5655

5756
unit-with-race-cover: get-deps-tests build verify
5857
@echo "go test SDK and vendor packages"
59-
@go test -race -cpu=1,2,4 $(SDK_ONLY_PKGS)
58+
@go test -tags example,codegen -race -cpu=1,2,4 $(SDK_ONLY_PKGS)
6059

6160
integration: get-deps-tests integ-custom smoke-tests performance
6261

awsmigrate/awsmigrate-renamer/renamer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package main
44

5-
//go:generate go run gen/gen.go
5+
//go:generate go run -tags deprecated gen/gen.go
66

77
import (
88
"os"

private/endpoints/endpoints.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Package endpoints validates regional endpoints for services.
22
package endpoints
33

4-
//go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go
4+
//go:generate go run -tags codegen ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go
55
//go:generate gofmt -s -w endpoints_map.go
66

77
import (

private/model/api/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build codegen
2+
13
// Package api represents API abstractions for rendering service generated files.
24
package api
35

private/model/api/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build 1.6
1+
// +build 1.6,codegen
22

33
package api
44

private/model/api/customization_passes.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build codegen
2+
13
package api
24

35
import (

private/model/api/docstring.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build codegen
2+
13
package api
24

35
import (

private/model/api/exportable_name.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build codegen
2+
13
package api
24

35
import "strings"

private/model/api/load.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build codegen
2+
13
package api
24

35
import (

private/model/api/load_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build 1.6
1+
// +build 1.6,codegen
22

33
package api
44

0 commit comments

Comments
 (0)