Skip to content

Commit

Permalink
Add --accept tests with a readme
Browse files Browse the repository at this point in the history
- Stackage has with-compiler: ghc-9.6.3
- allow-newer: hashable:* for tests
- Avoid this diff because of conditionals in hashable package by comment out their conditional build-depends:

+ - base-orphans-0.9.1 (lib) (requires build)
+ - data-array-byte-0.1.0.1 (lib) (requires build)
  - hashable-1.4.2.0 (lib) (requires build)

Accept that nightly builds with ghc-9.6.3
  • Loading branch information
philderbeast committed Dec 14, 2023
1 parent 1799cbc commit 56bad6b
Show file tree
Hide file tree
Showing 29 changed files with 933 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/0-local.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# cabal v2-build
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: cabal-version-override-0.1.0.0 (user goal)
[__1] next goal: hashable (dependency of cabal-version-override)
[__1] rejecting: hashable-1.4.3.0 (constraint from project config ProjectConfigImport {importDepth = 0, importPath = "<ROOT>/0-local.project"} requires ==1.4.2.0)
[__1] rejecting: hashable-1.4.2.0 (constraint from project config ProjectConfigImport {importDepth = 0, importPath = "<ROOT>/0-local.project"} requires ==1.4.3.0)
[__1] fail (backjumping, conflict set: cabal-version-override, hashable)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: hashable (3), cabal-version-override (2)
3 changes: 3 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/0-local.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages: .
constraints: hashable ==1.4.3.0
constraints: hashable ==1.4.2.0
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/0-local.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

main = cabalTest . withRepo "repo" . withProjectFile "0-local.project" $ do
fails $ cabal "v2-build" ["--dry-run"]
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/1-local.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal v2-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 would be built:
- hashable-1.4.2.0 (lib) (requires build)
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run)
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/1-local.project
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-local.config
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/1-local.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

main = cabalTest . withRepo "repo" . withProjectFile "1-local.project" $ do
cabal "v2-build" ["--dry-run"]
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/1-web.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# 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)
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/1-web.project
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: https://www.stackage.org/nightly-2023-12-07/cabal.config
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/1-web.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

main = cabalTest . withRepo "repo" . withProjectFile "1-web.project" $ do
cabal "v2-build" ["--dry-run"]
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/2-local.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal v2-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 would be built:
- hashable-1.4.2.0 (lib) (requires build)
- cabal-version-override-0.1.0.0 (exe:cabal-version-override) (first run)
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/2-local.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages: .
allow-newer: hashable:*
import: hop-local.config
constraints: hashable ==1.4.2.0
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/2-local.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

main = cabalTest . withRepo "repo" . withProjectFile "2-local.project" $ do
cabal "v2-build" ["--dry-run"]
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/2-web.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# 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)
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/2-web.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages: .
allow-newer: hashable:*
import: stackage-web.config
constraints: hashable ==1.4.2.0
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/2-web.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

main = cabalTest . withRepo "repo" . withProjectFile "2-web.project" $ do
cabal "v2-build" ["--dry-run"]
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/3-web.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# 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)
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/3-web.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages: .
allow-newer: hashable:*
import: hop-web.config
constraints: hashable ==1.4.2.0
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/3-web.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

main = cabalTest . withRepo "repo" . withProjectFile "3-web.project" $ do
cabal "v2-build" ["--dry-run"]
5 changes: 5 additions & 0 deletions cabal-testsuite/PackageTests/VersionPriority/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Revision history for cabal-version-override

## 0.1.0.0 -- YYYY-mm-dd

* First version. Released on an unsuspecting world.
Loading

0 comments on commit 56bad6b

Please sign in to comment.