-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute correct install directories for instantiated Backpack compone…
…nts (#6317) * Restructure Includes3 tests so that I can also test Hackage case. Signed-off-by: Edward Z. Yang <[email protected]> * Compute correct install directories for instantiated Backpack components Previously, we would compute elabInstallDirs once when configuring a component, and then reuse the exactly same install directories for every instantiation of the package. But this is wrong, since we're installing the header/object files for each instantiation to a different directory. We refactor install directory computation into a helper function and then call it again at instantiation time to refresh the install directories. For some reason, this bug ONLY manifests for packages installed from Hackage; it seems install dirs are not respected for inplace packages. Fixes #6005 Signed-off-by: Edward Z. Yang <[email protected]> * Test fix Signed-off-by: Edward Z. Yang <[email protected]> * Copy backpack version-guard from other backpack testcases
- Loading branch information
Showing
19 changed files
with
130 additions
and
86 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
29 changes: 29 additions & 0 deletions
29
cabal-testsuite/PackageTests/Backpack/Includes3/cabal-repo.out
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,29 @@ | ||
# cabal v1-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- sigs-0.1.0.0 (lib) (requires download & build) | ||
- indef-0.1.0.0 (lib) (requires download & build) | ||
- indef-0.1.0.0 (lib with Data.Map=containers-<VERSION>:Data.Map) (requires download & build) | ||
- exe-0.1.0.0 (exe:exe) (first run) | ||
Configuring library for sigs-0.1.0.0.. | ||
Preprocessing library for sigs-0.1.0.0.. | ||
Building library instantiated with Data.Map = <Data.Map> | ||
for sigs-0.1.0.0.. | ||
Installing library in <PATH> | ||
Configuring library for indef-0.1.0.0.. | ||
Preprocessing library for indef-0.1.0.0.. | ||
Building library instantiated with Data.Map = <Data.Map> | ||
for indef-0.1.0.0.. | ||
Installing library in <PATH> | ||
Configuring library instantiated with Data.Map = containers-<VERSION>:Data.Map | ||
for indef-0.1.0.0.. | ||
Preprocessing library for indef-0.1.0.0.. | ||
Building library instantiated with Data.Map = containers-<VERSION>:Data.Map | ||
for indef-0.1.0.0.. | ||
Installing library in <PATH> | ||
Configuring executable 'exe' for exe-0.1.0.0.. | ||
Preprocessing executable 'exe' for exe-0.1.0.0.. | ||
Building executable 'exe' for exe-0.1.0.0.. |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/Backpack/Includes3/cabal-repo.test.hs
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 @@ | ||
import Test.Cabal.Prelude | ||
main = withShorterPathForNewBuildStore $ \storeDir -> | ||
cabalTest $ do | ||
skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) | ||
skipIf =<< isWindows -- TODO: https://github.com/haskell/cabal/issues/6271 | ||
withProjectFile "cabal.repo.project" $ do | ||
withRepo "repo" $ do | ||
cabalG ["--store-dir=" ++ storeDir] "v2-build" ["exe"] |
2 changes: 1 addition & 1 deletion
2
cabal-testsuite/PackageTests/Backpack/Includes3/cabal.external.project
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 |
---|---|---|
@@ -1 +1 @@ | ||
packages: exe indef sigs | ||
packages: repo/exe-0.1.0.0 repo/indef-0.1.0.0 repo/sigs-0.1.0.0 |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/Backpack/Includes3/cabal.repo.project
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: repo/exe-0.1.0.0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
Oops, something went wrong.