-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8488 from haskell/t8487-build-profile-msg-reflect…
…-global-config "Build profile" now reflects optimization level set in global config
- Loading branch information
Showing
8 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# cabal build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O2 | ||
In order, the following will be built: | ||
- test-0.1.0.0 (lib) (first run) | ||
Configuring library for test-0.1.0.0.. | ||
Preprocessing library for test-0.1.0.0.. | ||
Building library for test-0.1.0.0.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- 2022-09-20, issue #8487 | ||
-- | ||
|
||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
cabalG [ "--config-file", "config.file" ] "build" [ "test" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
optimization: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cabal-version: 3.0 | ||
name: test | ||
version: 0.1.0.0 | ||
license: NONE | ||
author: [email protected] | ||
maintainer: Artem Pelenitsyn | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
synopsis: "Build profile" message now reflects optimization level set in global config | ||
packages: cabal-install | ||
prs: #8488 | ||
issues: #8487 | ||
|
||
description: { | ||
|
||
Imagine you have `optimization: 2` in your `~/.cabal/config`, and you call `cabal build` | ||
in a project that doesn't have optimization level explicitly set in its project file. | ||
You will still see 'Build profile: -w ghc-<VER> -O1'. This is incorrect and was fixed | ||
in this patch: now you'll see '-O2'. | ||
} |