From a971141ed5ccecd5ba256e1639ebe6b729a72e78 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Fri, 2 Jan 2026 16:06:01 +0100 Subject: [PATCH 1/4] Force people to have cabal.project.local Some of the flags are important for dev machines to work smoothly. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 10cb677a95..07670afe88 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,10 @@ c: treefmt c-fast .PHONY: c c-fast: + if [ ! -e "cabal.project.local" ]; then \ + echo "'cabal.project.local' not found. please run 'make cabal.project.local' and tweak the output to your liking." + exit 1; \ + fi cabal build $(WIRE_CABAL_BUILD_OPTIONS) $(package) || ( make clean-hint; false ) ifeq ($(test), 1) ./hack/bin/cabal-run-tests.sh $(package) $(testargs) From b9cad76912ff5b59373da0186e141aedfea14237 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Fri, 2 Jan 2026 22:48:22 +0100 Subject: [PATCH 2/4] Tweak cabal.project.local.template. --- hack/bin/cabal.project.local.template | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hack/bin/cabal.project.local.template b/hack/bin/cabal.project.local.template index 9264d3a48f..dd27e42371 100644 --- a/hack/bin/cabal.project.local.template +++ b/hack/bin/cabal.project.local.template @@ -1,6 +1,12 @@ -test-show-details: direct +-- disable profilling. if you are using hls/lsp, you probably want to +-- enable this. same as `ghc-options: -fwrite-ide-info`. profiling: False profiling-detail: late + +-- .ghc.environment is not used in .cabal-v2 and may conflict with hls. +write-ghc-environment-files: never + +-- disable optimization. very important for dev machines. implies `ghc-options: -O0`. optimization: False -program-options - ghc-options: -O0 + +test-show-details: direct From 565574914091189ef5403e1603782cb7a267dd62 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Fri, 2 Jan 2026 22:51:13 +0100 Subject: [PATCH 3/4] mv cabal.project.local.template out of `bin` directory. --- Makefile | 2 +- hack/{bin => }/cabal.project.local.template | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hack/{bin => }/cabal.project.local.template (100%) diff --git a/Makefile b/Makefile index 07670afe88..542f50fe6b 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,7 @@ clean-hint: .PHONY: cabal.project.local cabal.project.local: - cp ./hack/bin/cabal.project.local.template ./cabal.project.local + cp ./hack/cabal.project.local.template ./cabal.project.local # Usage: make c package=brig test=1 .PHONY: c diff --git a/hack/bin/cabal.project.local.template b/hack/cabal.project.local.template similarity index 100% rename from hack/bin/cabal.project.local.template rename to hack/cabal.project.local.template From eb65180e6518c207441c267ee6e3279fc306e949 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Fri, 2 Jan 2026 22:51:34 +0100 Subject: [PATCH 4/4] `rm .ghc.environment` in `make clean`. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 542f50fe6b..3f5894e49b 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ ifeq ("$(package)", "all") else -if ( test -e dist || test -e dist-newstyle ); then find dist* -type d -name '$(package)-*' -exec rm -rf {}; fi endif - # `/dist` shouldn't be created or used by anybody any more, we're just making sure here. - -rm -rf dist + # `/dist` and `.ghc.environment` shouldn't be created or used by anybody any more, we're just making sure here. + -rm -rf dist .ghc.environment -rm -f "bill-of-materials.$(HELM_SEMVER).json" .PHONY: clean-hint