haskell / haskell/cabal

cabal new-configure --disable-optimization has no effect if ghc-options in cabal file contain optimization flag

Open
#5,353 3 comments 3 reactions 0 assignees View on GitHub
cabal-install: cmd/(re)configure cabal-install: v2-build system re: -O2 type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

As in the title. `cabal new-configure --disable-optimization` doesn't actually disable optimization if `ghc-options` in the cabal file have e.g. `-O2`. This works with the old `cabal configure`.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a cabal file containing an optimization flag in ghc-options, comparing cabal new-configure --disable-optimization with the old cabal configure. Trace how each command handles the configuration flag and ghc-options; done means the new command disables optimization in the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.