Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ full-clean: clean
.PHONY: clean
clean:
cabal clean
-rm -rf dist
-rm -rf dist .ghc.environment # cabal-v2 does not use these any more, so they shouldn't be there in the first place.
-rm -f "bill-of-materials.$(HELM_SEMVER).json"

.PHONY: clean-hint
Expand All @@ -83,14 +83,18 @@ 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
c: treefmt c-fast

.PHONY: c
c-fast:
if [ ! -e "cabal.project.local" ]; then \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if you're re-inventing the cabal.project.local Makefile target here? 🤔

IMHO there should be at least a comment which explains how these two ways relate and why yours is needed/better/... 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, indeed, forgot about that. i'll try again tomorrow.

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)
Expand Down
6 changes: 0 additions & 6 deletions hack/bin/cabal.project.local.template

This file was deleted.

12 changes: 12 additions & 0 deletions hack/cabal.project.local.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- 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

test-show-details: direct