summaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorYuxuan 'fishy' Wang <yuxuan.wang@reddit.com>2022-10-28 10:29:25 -0700
committerYuxuan 'fishy' Wang <fishywang@gmail.com>2022-11-02 15:44:07 -0700
commite8353cb46e9f5e71f9b76f55d6bf59530b7f98ef (patch)
tree0a115e7b4edaf865c497a01196f9fc60acd8d734 /tutorial
parent2acfe0fc7a1747c327da66c8a693840ba0c5a016 (diff)
downloadthrift-e8353cb46e9f5e71f9b76f55d6bf59530b7f98ef.tar.gz
Use multi-module to cleanup top level go.mod
Client: go The go library itself does not have any third-party dependencies. We have one third party dependency from the test code, which kind of polluted from top-level go.mod file to the users of thrift go library. We previous tried to clean that up by creating go.mod file at lib/go/thrift, which caused issues to the release process and thus reverted. Use multi-module to separate tests requiring mock to their own modules so that we can keep the top-level go.mod file clean. Also some minor fixes on the github actions go workflow.
Diffstat (limited to 'tutorial')
-rw-r--r--tutorial/go/Makefile.am16
1 files changed, 6 insertions, 10 deletions
diff --git a/tutorial/go/Makefile.am b/tutorial/go/Makefile.am
index e323358fd..b2f70ce12 100644
--- a/tutorial/go/Makefile.am
+++ b/tutorial/go/Makefile.am
@@ -17,11 +17,7 @@
# under the License.
#
-if GOVERSION_GE_118
GOBUILDEXTRA = -buildvcs=false
-else
-GOBUILDEXTRA =
-endif
gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/tutorial/go/gen-go/$(COMPILER_EXTRAFLAG) -r $<
@@ -29,22 +25,22 @@ gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tut
all-local: gen-go/tutorial/calculator.go
check: thirdparty-dep all
- $(GO) build $(GOBUILDEXTRA) -mod=mod -o go-tutorial ./src
- $(GO) build $(GOBUILDEXTRA) -mod=mod -o calculator-remote ./gen-go/tutorial/calculator-remote/calculator-remote.go
+ $(GO) build $(GOBUILDEXTRA) -o go-tutorial ./src
+ $(GO) build $(GOBUILDEXTRA) -o calculator-remote ./gen-go/tutorial/calculator-remote/calculator-remote.go
thirdparty-dep:
tutorialserver: all
- $(GO) run -mod=mod src/*.go -server=true
+ $(GO) run src/*.go -server=true
tutorialclient: all
- $(GO) run -mod=mod src/*.go
+ $(GO) run src/*.go
tutorialsecureserver: all
- $(GO) run -mod=mod src/*.go -server=true -secure=true
+ $(GO) run src/*.go -server=true -secure=true
tutorialsecureclient: all
- $(GO) run -mod=mod src/*.go -secure=true
+ $(GO) run src/*.go -secure=true
clean-local:
$(RM) -r gen-* go-tutorial calculator-remote