-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test projects with import then constraints and vice-versa
- Loading branch information
1 parent
5e0366c
commit 11c1cb3
Showing
20 changed files
with
200 additions
and
55 deletions.
There are no files selected for viewing
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/VersionPriority/1-local-import-constraints.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,4 @@ | ||
packages: . | ||
allow-newer: hashable:* | ||
import: stackage-local.config | ||
constraints: hashable ==1.4.2.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 |
---|---|---|
@@ -1,22 +1,42 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# --version-win not supplied, default | ||
# 1-local-constraints-import.project --version-win not supplied, default | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# --version-win=shallowest | ||
# 1-local-constraints-import.project --version-win=shallowest | ||
# cabal v2-build | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# --version-win=latest | ||
# 1-local-constraints-import.project --version-win=latest | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.3.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# 1-local-import-constraints.project --version-win not supplied, default | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# 1-local-import-constraints.project --version-win=shallowest | ||
# cabal v2-build | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# 1-local-import-constraints.project --version-win=latest | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) |
21 changes: 13 additions & 8 deletions
21
cabal-testsuite/PackageTests/VersionPriority/1-local.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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . withRepo "repo" . withProjectFile "1-local.project" . recordMode RecordMarked $ do | ||
let log = recordHeader . pure | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
testVersionWin project = | ||
withProjectFile project $ do | ||
let log = recordHeader . pure . ((project <> " ") <>) | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
|
||
main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do | ||
testVersionWin "1-local-constraints-import.project" | ||
testVersionWin "1-local-import-constraints.project" |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/VersionPriority/1-web-import-constraints.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,4 @@ | ||
packages: . | ||
allow-newer: hashable:* | ||
import: https://www.stackage.org/nightly-2023-12-07/cabal.config | ||
constraints: hashable ==1.4.2.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 |
---|---|---|
@@ -1,22 +1,42 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# --version-win not supplied, default | ||
# 1-web-constraints-import.project --version-win not supplied, default | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-9.6.3 -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# --version-win=shallowest | ||
# 1-web-constraints-import.project --version-win=shallowest | ||
# cabal v2-build | ||
Build profile: -w ghc-9.6.3 -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# --version-win=latest | ||
# 1-web-constraints-import.project --version-win=latest | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-9.6.3 -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.3.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# 1-web-import-constraints.project --version-win not supplied, default | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-9.6.3 -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# 1-web-import-constraints.project --version-win=shallowest | ||
# cabal v2-build | ||
Build profile: -w ghc-9.6.3 -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) | ||
# 1-web-import-constraints.project --version-win=latest | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-9.6.3 -O1 | ||
In order, the following would be built: | ||
- hashable-1.4.2.0 (lib) (requires build) | ||
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run) |
21 changes: 13 additions & 8 deletions
21
cabal-testsuite/PackageTests/VersionPriority/1-web.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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . withRepo "repo" . withProjectFile "1-web.project" . recordMode RecordMarked $ do | ||
testVersionWin project = | ||
withProjectFile project $ do | ||
let log = recordHeader . pure . ((project <> " ") <>) | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
|
||
main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do | ||
-- To avoid this diff: | ||
-- -Build profile: -w ghc-9.6.3 -O1 | ||
-- +Build profile: -w ghc-<GHCVER> -O1 | ||
skipIfGhcVersion "== 9.6.3" | ||
let log = recordHeader . pure | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
testVersionWin "1-web-constraints-import.project" | ||
testVersionWin "1-web-import-constraints.project" |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/VersionPriority/2-local-constraints-import.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,4 @@ | ||
packages: . | ||
allow-newer: hashable:* | ||
constraints: hashable ==1.4.2.0 | ||
import: hop-local.config |
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
21 changes: 13 additions & 8 deletions
21
cabal-testsuite/PackageTests/VersionPriority/2-local.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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . withRepo "repo" . withProjectFile "2-local.project" . recordMode RecordMarked $ do | ||
let log = recordHeader . pure | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
testVersionWin project = | ||
withProjectFile project $ do | ||
let log = recordHeader . pure . ((project <> " ") <>) | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
|
||
main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do | ||
testVersionWin "2-local-constraints-import.project" | ||
testVersionWin "2-local-import-constraints.project" |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/VersionPriority/2-web-constraints-import.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,4 @@ | ||
packages: . | ||
allow-newer: hashable:* | ||
constraints: hashable ==1.4.2.0 | ||
import: stackage-web.config |
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
21 changes: 13 additions & 8 deletions
21
cabal-testsuite/PackageTests/VersionPriority/2-web.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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . withRepo "repo" . withProjectFile "2-web.project" . recordMode RecordMarked $ do | ||
testVersionWin project = | ||
withProjectFile project $ do | ||
let log = recordHeader . pure . ((project <> " ") <>) | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
|
||
main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do | ||
-- To avoid this diff: | ||
-- -Build profile: -w ghc-9.6.3 -O1 | ||
-- +Build profile: -w ghc-<GHCVER> -O1 | ||
skipIfGhcVersion "== 9.6.3" | ||
let log = recordHeader . pure | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
testVersionWin "2-web-constraints-import.project" | ||
testVersionWin "2-web-import-constraints.project" |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/VersionPriority/3-web-constraints-import.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,4 @@ | ||
packages: . | ||
allow-newer: hashable:* | ||
constraints: hashable ==1.4.2.0 | ||
import: hop-web.config |
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
21 changes: 13 additions & 8 deletions
21
cabal-testsuite/PackageTests/VersionPriority/3-web.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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . withRepo "repo" . withProjectFile "3-web.project" . recordMode RecordMarked $ do | ||
testVersionWin project = | ||
withProjectFile project $ do | ||
let log = recordHeader . pure . ((project <> " ") <>) | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
|
||
main = cabalTest . withRepo "repo" . recordMode RecordMarked $ do | ||
-- To avoid this diff: | ||
-- -Build profile: -w ghc-9.6.3 -O1 | ||
-- +Build profile: -w ghc-<GHCVER> -O1 | ||
skipIfGhcVersion "== 9.6.3" | ||
let log = recordHeader . pure | ||
log "--version-win not supplied, default" | ||
cabal "v2-build" ["--dry-run"] | ||
log "--version-win=shallowest" | ||
cabal "v2-build" ["--dry-run", "--version-win=shallowest"] | ||
log "--version-win=latest" | ||
cabal "v2-build" ["--dry-run", "--version-win=latest"] | ||
testVersionWin "3-web-constraints-import.project" | ||
testVersionWin "3-web-import-constraints.project" |