diff --git a/Makefile b/Makefile index 5801dacfb..6f1044da2 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,10 @@ thrift:: grpc:: grpc-cpp grpc-hs grpc-hs-deps:: - # Always install proto-lens-protoc to avoid inconsistency - (cd ~ && cabal install -j$(CABAL_BUILD_PARALLEL) --overwrite-policy=always proto-lens-protoc) + # 1. Always install proto-lens-protoc to avoid inconsistency + # 2. Change to a temporary dir to avoid create hstream dists. + (cd $(shell mktemp -d) && \ + cabal install -j$(CABAL_BUILD_PARALLEL) --overwrite-policy=always proto-lens-protoc) ($(CABAL) build -j$(CABAL_BUILD_PARALLEL) --project-file $(CABAL_PROJECT_FILE) proto3-suite && \ mkdir -p ~/.cabal/bin && \ $(CABAL) exec --project-file $(CABAL_PROJECT_FILE) \ diff --git a/script/dev-tools b/script/dev-tools index bb1ed4387..5d609cb07 100755 --- a/script/dev-tools +++ b/script/dev-tools @@ -935,9 +935,7 @@ class QuickBuildDevImageCommand: p.add_argument("--tag", "-t", required=True, help="target image tag") p.add_argument("--use-grpc-haskell", default=False, action="store_true") p.add_argument("--donot-rename-exe", default=False, action="store_true") - p.add_argument( - "--enable-debug-info", default=False, action="store_true" - ) + p.add_argument("--debug", default=False, action="store_true") p.add_argument("--ghc-options", required=False, default="") p.add_argument("--fast", default=False, action="store_true") p.add_argument("--only-hstream", default=False, action="store_true") @@ -951,14 +949,14 @@ class QuickBuildDevImageCommand: builder_image, use_grpc_haskell=False, donot_rename_exe=False, - enable_debug_info=False, + debug=False, fast=False, only_hstream=False, project_file="cabal.project", ghc_options="", **kargs, ): - debug_arg = "--enable-debug-info" if enable_debug_info else "" + debug_arg = "--enable-debug-info --ghc-options=-debug" if debug else "" hsgrpc_arg = ( " ".join( [