Skip to content

Commit e4ac638

Browse files
committed
Added Stack error message
1 parent c2312af commit e4ac638

File tree

7 files changed

+277
-1
lines changed

7 files changed

+277
-1
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: blah
2+
version: 0.1.0.0
3+
github: "githubuser/blah"
4+
license: BSD3
5+
author: "Author name here"
6+
maintainer: "[email protected]"
7+
copyright: "2022 Author name here"
8+
9+
extra-source-files:
10+
- README.md
11+
- CHANGELOG.md
12+
13+
# Metadata used when publishing your package
14+
# synopsis: Short description of your package
15+
# category: Web
16+
17+
# To avoid duplicated efforts in documentation and dealing with the
18+
# complications of embedding Haddock markup inside cabal files, it is
19+
# common to point users to the README.md file.
20+
description: Please see the README on GitHub at <https://github.com/githubuser/blah#readme>
21+
22+
dependencies:
23+
- base >= 4.7 && < 5
24+
- say >= 0.1.0.1
25+
26+
ghc-options:
27+
- -Wall
28+
- -Wcompat
29+
- -Widentities
30+
- -Wincomplete-record-updates
31+
- -Wincomplete-uni-patterns
32+
- -Wmissing-export-lists
33+
- -Wmissing-home-modules
34+
- -Wpartial-fields
35+
- -Wredundant-constraints
36+
37+
library:
38+
source-dirs: src
39+
40+
executables:
41+
blah-exe:
42+
main: Main.hs
43+
source-dirs: app
44+
ghc-options:
45+
- -threaded
46+
- -rtsopts
47+
- -with-rtsopts=-N
48+
dependencies:
49+
- blah
50+
51+
tests:
52+
blah-test:
53+
main: Spec.hs
54+
source-dirs: test
55+
ghc-options:
56+
- -threaded
57+
- -rtsopts
58+
- -with-rtsopts=-N
59+
dependencies:
60+
- blah
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: blah
2+
version: 0.1.0.0
3+
github: "githubuser/blah"
4+
license: BSD3
5+
author: "Author name here"
6+
maintainer: "[email protected]"
7+
copyright: "2022 Author name here"
8+
9+
extra-source-files:
10+
- README.md
11+
- CHANGELOG.md
12+
13+
# Metadata used when publishing your package
14+
# synopsis: Short description of your package
15+
# category: Web
16+
17+
# To avoid duplicated efforts in documentation and dealing with the
18+
# complications of embedding Haddock markup inside cabal files, it is
19+
# common to point users to the README.md file.
20+
description: Please see the README on GitHub at <https://github.com/githubuser/blah#readme>
21+
22+
dependencies:
23+
- base >= 4.7 && < 5
24+
- say >= 0.2.0.1
25+
26+
ghc-options:
27+
- -Wall
28+
- -Wcompat
29+
- -Widentities
30+
- -Wincomplete-record-updates
31+
- -Wincomplete-uni-patterns
32+
- -Wmissing-export-lists
33+
- -Wmissing-home-modules
34+
- -Wpartial-fields
35+
- -Wredundant-constraints
36+
37+
library:
38+
source-dirs: src
39+
40+
executables:
41+
blah-exe:
42+
main: Main.hs
43+
source-dirs: app
44+
ghc-options:
45+
- -threaded
46+
- -rtsopts
47+
- -with-rtsopts=-N
48+
dependencies:
49+
- blah
50+
51+
tests:
52+
blah-test:
53+
main: Spec.hs
54+
source-dirs: test
55+
ghc-options:
56+
- -threaded
57+
- -rtsopts
58+
- -with-rtsopts=-N
59+
dependencies:
60+
- blah
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Package version does not match Stack configuration
3+
---
4+
5+
The specific version of the package is not provided by the snapshot. The error that results from `stack build` is:
6+
```text
7+
Error: [S-4804]
8+
Stack failed to construct a build plan.
9+
10+
While constructing the build plan, Stack encountered the following exceptions:
11+
12+
In the dependencies for blah-0.1.0.0:
13+
say-0.1.0.1 from Stack configuration does not match >=0.2.0.1
14+
needed since blah is a build target.
15+
16+
Some different approaches to resolving this:
17+
18+
* Set 'allow-newer: true'
19+
in /home/USER/.stack/config.yaml to ignore all version constraints and build anyway.
20+
```

message-index/messages/S-4804/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Stack failed to construct a build plan
3-
summary: The package could not be found in the snapshot
3+
summary: The package with the given name or version could not be found in the snapshot
44
severity: error
55
introduced: 2.9.3
66
---
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: blah
2+
version: 0.1.0.0
3+
github: "githubuser/blah"
4+
license: BSD3
5+
author: "Author name here"
6+
maintainer: "[email protected]"
7+
copyright: "2022 Author name here"
8+
9+
extra-source-files:
10+
- README.md
11+
- CHANGELOG.md
12+
13+
# Metadata used when publishing your package
14+
# synopsis: Short description of your package
15+
# category: Web
16+
17+
# To avoid duplicated efforts in documentation and dealing with the
18+
# complications of embedding Haddock markup inside cabal files, it is
19+
# common to point users to the README.md file.
20+
description: Please see the README on GitHub at <https://github.com/githubuser/blah#readme>
21+
22+
dependencies:
23+
- base >= 4.7 && < 5
24+
25+
ghc-options:
26+
- -Wall
27+
- -Wcompat
28+
- -Widentities
29+
- -Wincomplete-record-updates
30+
- -Wincomplete-uni-patterns
31+
- -Wmissing-export-lists
32+
- -Wmissing-home-modules
33+
- -Wpartial-fields
34+
- -Wredundant-constraints
35+
36+
library:
37+
source-dirs: src
38+
39+
executables:
40+
blah-exe:
41+
main: Main.hs
42+
source-dirs: app
43+
ghc-options:
44+
- -threaded
45+
- -rtsopts
46+
- -with-rtsopts=-N
47+
dependencies:
48+
- blah
49+
50+
tests:
51+
blah-test:
52+
main: Spec.hs
53+
source-dirs: test
54+
ghc-options:
55+
- -threaded
56+
- -rtsopts
57+
- -with-rtsopts=-N
58+
dependencies:
59+
- blah
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: blah
2+
version: 0.1.0.0
3+
github: "githubuser/blah"
4+
license: BSD3
5+
author: "Author name here"
6+
maintainer: "[email protected]"
7+
copyright: "2022 Author name here"
8+
9+
extra-source-files:
10+
- README.md
11+
- CHANGELOG.md
12+
13+
# Metadata used when publishing your package
14+
# synopsis: Short description of your package
15+
# category: Web
16+
17+
# To avoid duplicated efforts in documentation and dealing with the
18+
# complications of embedding Haddock markup inside cabal files, it is
19+
# common to point users to the README.md file.
20+
description: Please see the README on GitHub at <https://github.com/githubuser/blah#readme>
21+
22+
dependencies:
23+
- base >= 4.7 && < 5
24+
- wrong-package >= 0.2
25+
26+
ghc-options:
27+
- -Wall
28+
- -Wcompat
29+
- -Widentities
30+
- -Wincomplete-record-updates
31+
- -Wincomplete-uni-patterns
32+
- -Wmissing-export-lists
33+
- -Wmissing-home-modules
34+
- -Wpartial-fields
35+
- -Wredundant-constraints
36+
37+
library:
38+
source-dirs: src
39+
40+
executables:
41+
blah-exe:
42+
main: Main.hs
43+
source-dirs: app
44+
ghc-options:
45+
- -threaded
46+
- -rtsopts
47+
- -with-rtsopts=-N
48+
dependencies:
49+
- blah
50+
51+
tests:
52+
blah-test:
53+
main: Spec.hs
54+
source-dirs: test
55+
ghc-options:
56+
- -threaded
57+
- -rtsopts
58+
- -with-rtsopts=-N
59+
dependencies:
60+
- blah
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: The package does not exist in the snapshot
3+
---
4+
5+
The given package name is not provided by the snapshot. For example, `stack build` results in the error:
6+
```
7+
Error: [S-4804]
8+
Stack failed to construct a build plan.
9+
10+
While constructing the build plan, Stack encountered the following exceptions:
11+
12+
In the dependencies for blah-0.1.0.0:
13+
wrong-package must match >=0.2, but the Stack configuration has no specified version (no
14+
package with that name found, perhaps there is a typo in a package's
15+
build-depends or an omission from the stack.yaml packages list?)
16+
needed since blah is a build target.
17+
```

0 commit comments

Comments
 (0)