-
Notifications
You must be signed in to change notification settings - Fork 848
extra-dep
is ignored when other version already in snapshot
#5679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've definitely used |
This FAQ entry suggests quite directly that |
I got another instance of this issue: Maybe This would mean that mediate dependencies cannot be updated unless they are needed due to a configuration error otherwise?! |
On Windows 11, I can build resolver: lts-14.27
packages:
- .
extra-deps:
# HSOpenSSL-0.11.6.1: Windows: Use libcrypto instead of eay; allow pkg-config.
- HsOpenSSL-0.11.6.1
# Missing from lts-14.27:
- brotli-0.0.0.0
- brotli-streams-0.0.0.0
- http-io-streams-0.1.6.0@rev:0
- base64-bytestring-1.1.0.0@sha256:190264fef9e65d9085f00ccda419137096d1dc94777c58272bc96821dc7f37c3,2334
- Cabal-3.4.1.0@sha256:48e64c97688149fac15445803830177248f15a9b1a783389efed5e375d70d2d0,31402
- ghc-byteorder-4.11.0.0.10@sha256:e345720de7b28ba1bf434775d34d3b94da8e8dd5dc24469f008e1f82717c0352,1594
- xor-0.0.1.1@sha256:60929c5aa763534e1bcfe15d787c99a582ae17e3d9697fb86e53c3403d1e5b3b,2950 To do that, I need first to install some C libraries, namely:
The exception is that the registration of
|
The problem I was having with |
In summary, I can't reproduce the difficulty in using |
@andreasabel, is this still an issue for you? I could not reproduce it. |
Ok, I will repeat the experiment. (Could also be related to caching so that it cannot be reproduced on a fresh instance.)
I found the information here: stack/doc/yaml_configuration.md Lines 43 to 48 in de309ad
|
Well, in the repetition of my experiment, removing the
(Unrelated, out of curiousity: why does stack name a directory @milgrem wrote:
Did you check whether |
Returning to this after a hiatus, with Stack 2.15.1 and a simple cross-platform example. A single-package project that implements the name: edTest
version: 0.1.0.0
dependencies:
- base >= 4.7 && < 5
- ansi-terminal
executables:
edTest:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N With snapshot: lts-22.12
With snapshot: lts-22.12
extra-deps:
- ansi-terminal-1.1
|
I am going to close this issue given the passage of time and because I cannot reproduce it, including on a Mac mini/M1 with Stack 2.13.1. If I have a simple one-package project with dependencies:
- base >= 4.7 && < 5
- HsOpenSSL and snapshot: lts-20.26 then If I change snapshot: lts-20.26
extra-deps:
- HsOpenSSL-0.11.7.6 then |
TL;DR: Unclear meaning of
extra-dep
when another version is already in the snapshot. Should it error/warn? Improve documentation?!The following stack file did not work under Windows:
https://github.com/hackage-trustees/hackage-cli/blob/3c0f18bec5cdcb7a6ed92220335b942307b458ae/stack-8.6.5.yaml
The reason is that
HsOpenSSL-0.11.4.17
(viahttp-io-streams
) in the snapshot refers to C libraryeay32
which has been renamed tocrypto
.I tried to force
HsOpenSSL-0.11.6.1
by adding it toextra-deps
. However, stack still usedHsOpenSSL-0.11.4.17
:https://github.com/hackage-trustees/hackage-cli/runs/5199834098?check_suite_focus=true
I would have assumed that specifying a specific library version under
extra-deps
would have a similar effect than--constraint='HsOpenSSL==0.11.6.1'
passed tocabal
(orconstraint: HsOpenSSL==0.11.6.1
incabal.project
).The documentation isn't telling me what happens if an
extra-dep
is already in the snapshot:stack/doc/yaml_configuration.md
Lines 171 to 176 in aac15d0
I think it should be more explicit about this case.
It seems that I need to drop
HsOpenSSL
first before I can request a different version:The text was updated successfully, but these errors were encountered: