haskell / haskell/cabal

--library-profiling-detail seems a bit missleading.

Open
#8,530 3 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/build re: ghc-options re: project-file type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**

It seems the flag only affects "local" packages. For "global" packages the flag is either ignored when checking if we need to rebuild or completely.

**To Reproduce**
Steps to reproduce the behavior:

```
cabal unpack hasktags
cd hasktags

# Build with library-profiling set to auto
cabal build --enable-profiling --enable-executable-profiling --enable-library-profiling --library-profiling-detail=auto

... # Builds libs +executable

# Change library profiling detail
cabal build --enable-profiling --enable-executable-profiling --enable-library-profiling --library-profiling-detail=none

```

## **Expected behavior**

I would have expected this to work similar to ghc-options where it causes packages to be rebuilt with the appropriate profiling flags set.

**System information**
- Operating system
- `cabal`, `ghc` versions

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.