diff --git a/ChangeLog.md b/ChangeLog.md index fd678cae67..cc90e61dcc 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,11 @@ Release notes: +* The hash that Stack uses to distinguish one build plan from another has + changed for plans that set (as opposed to unset) manually Cabal flags for + immutable dependencies. This will cause Stack to rebuild dependencies for such + plans. + **Changes since v2.15.6.1:** Major changes: @@ -14,6 +19,10 @@ Other enhancements: Bug fixes: +* The hashes that Stack uses to distinguish one build plan from another now + include the Cabal flags for immutable dependencies set manually. Previously, + in error, only such flags that were unset manually were included. + ## v2.15.6.1 (release candidate) Release notes: diff --git a/doc/build_command.md b/doc/build_command.md index 21517270ab..0ef78a2571 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -281,13 +281,6 @@ This overrides: In order to set a Cabal flag for a GHC boot package, the package must be specified as an [extra-dep](yaml_configuration.md#extra-deps). -!!! warning - - Stack creates snapshots when building immutable dependencies of projects. - The names of Cabal flags that have been unset manually distinguish one such - snapshot from another. However, the names of Cabal flags that have been set - manually do not do so. - ### `--[no-]force-dirty` flag Default: Disabled diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index b9404d5f1c..235503163f 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -322,13 +322,6 @@ in the snapshot. In order to set a Cabal flag for a GHC boot package, the package must be specified as an [extra-dep](#extra-deps). -!!! warning - - Stack creates snapshots when building immutable dependencies of projects. - The names of Cabal flags that have been unset manually distinguish one such - snapshot from another. However, the names of Cabal flags that have been set - manually do not do so. - ### drop-packages [:octicons-tag-24: 2.1.1](https://github.com/commercialhaskell/stack/releases/tag/v2.1.1) diff --git a/src/Stack/Build/Source.hs b/src/Stack/Build/Source.hs index fb063c5fa0..04a44943db 100644 --- a/src/Stack/Build/Source.hs +++ b/src/Stack/Build/Source.hs @@ -194,9 +194,7 @@ depPackageHashableContent dp = PLMutable _ -> pure "" PLImmutable pli -> do let flagToBs (f, enabled) = - if enabled - then "" - else "-" <> fromString (C.unFlagName f) + (if enabled then "" else "-") <> fromString (C.unFlagName f) flags = map flagToBs $ Map.toList dp.depCommon.flags ghcOptions = map display dp.depCommon.ghcOptions cabalConfigOpts = map display dp.depCommon.cabalConfigOpts