Skip to content
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

stack list-dependencies: "Didn't see rts-1.0 in your package indices." #2967

Closed
sjakobi opened this issue Feb 2, 2017 · 7 comments
Closed

Comments

@sjakobi
Copy link
Member

sjakobi commented Feb 2, 2017

~/tmp $ stack new rts-bug
Downloading template "new-template" to create project "rts-bug" in rts-bug/ ...

The following parameters were needed by the template but not provided: category
You can provide them in /home/simon/.stack/config.yaml, like this:
templates:
  params:
    category: value
Or you can pass each one as parameters like this:
stack new rts-bug new-template -p "category:value"

Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- rts-bug/rts-bug.cabal

Selecting the best among 9 snapshots...

* Matches lts-7.18

Selected resolver: lts-7.18
Initialising configuration using resolver: lts-7.18
Total number of user packages considered: 1
Writing configuration to file: rts-bug/stack.yaml
All done.
~/tmp $ cd rts-bug/
~/t/rts-bug $ stack list-dependencies
Warning: File listed in rts-bug.cabal file does not exist: README.md
Didn't see rts-1.0 in your package indices.
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading timestamp                                                                            
No updates to your package list were found                                                       
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...The following package identifiers were not found in your indices: rts-1.0
Perhaps you meant hts, rss, or rws?
~/t/rts-bug $ stack exec -- ghc-pkg list
/home/simon/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/package.conf.d
    Cabal-1.24.0.0
    array-0.5.1.1
    base-4.9.0.0
    binary-0.8.3.0
    bytestring-0.10.8.1
    containers-0.5.7.1
    deepseq-1.4.2.0
    directory-1.2.6.2
    filepath-1.4.1.0
    ghc-8.0.1
    ghc-boot-8.0.1
    ghc-boot-th-8.0.1
    ghc-prim-0.5.0.0
    ghci-8.0.1
    haskeline-0.7.2.3
    hoopl-3.10.2.1
    hpc-0.6.0.3
    integer-gmp-1.0.0.1
    pretty-1.1.3.3
    process-1.4.2.0
    rts-1.0
    template-haskell-2.11.0.0
    terminfo-0.4.0.2
    time-1.6.0.1
    transformers-0.5.2.0
    unix-2.7.2.0
    xhtml-3000.2.1
/home/simon/.stack/snapshots/x86_64-linux/lts-7.18/8.0.1/pkgdb
    (no packages)
/home/simon/tmp/rts-bug/.stack-work/install/x86_64-linux/lts-7.18/8.0.1/pkgdb
    (no packages)
~/t/rts-bug $ stack --version
Version 1.3.3, Git revision fa3ed946844a8666bcde1a587c1158513a81c958 (dirty) (4526 commits) x86_64 hpack-0.17.0

Not sure what's going on.

@sjakobi
Copy link
Member Author

sjakobi commented Feb 2, 2017

v1.3.2 seems to work though:

~/t/rts-bug $ /usr/bin/stack list-dependencies 
Warning: File listed in rts-bug.cabal file does not exist: README.md
base 4.9.0.0
rts-bug 0.1.0.0
~/t/rts-bug $ /usr/bin/stack --version
Version 1.3.2, Git revision 3f675146590da4f3edf768b89355f798229da2a5 (4395 commits) x86_64 hpack-0.15.0

@mgsloan
Copy link
Contributor

mgsloan commented Feb 3, 2017

Thanks for reporting! I've pushed a fix, which is to not attempt to load the rts or ghc packages. I tested by running it on a package with all wired in packages listed as deps.

I ran into another issue, argh - #2969

@mgsloan mgsloan closed this as completed Feb 3, 2017
@domenkozar
Copy link
Contributor

@mgsloan I wonder why stack lists rts-1.0 in output of stack list-dependencies while that package doesn't even exist.

@mgsloan
Copy link
Contributor

mgsloan commented Aug 5, 2017

@domenkozar Exists for me, it is part of ghc:

$ stack exec -- ghc-pkg describe rts
name: rts
version: 1.0
id: rts
key: rts
license: BSD3
maintainer: glasgow-haskell-users@haskell.org
exposed: True
abi: 
trusted: False
library-dirs: /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/rts
hs-libraries: HSrts Cffi
extra-libraries:
    m rt dl pthread
include-dirs: /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/include
includes:
    Stg.h
ld-options: "-Wl,-u,ghczmprim_GHCziTypes_Izh_static_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Czh_static_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info"
            "-Wl,-u,base_GHCziPtr_Ptr_static_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info"
            "-Wl,-u,base_GHCziInt_I8zh_static_info"
            "-Wl,-u,base_GHCziInt_I16zh_static_info"
            "-Wl,-u,base_GHCziInt_I32zh_static_info"
            "-Wl,-u,base_GHCziInt_I64zh_static_info"
            "-Wl,-u,base_GHCziWord_W8zh_static_info"
            "-Wl,-u,base_GHCziWord_W16zh_static_info"
            "-Wl,-u,base_GHCziWord_W32zh_static_info"
            "-Wl,-u,base_GHCziWord_W64zh_static_info"
            "-Wl,-u,base_GHCziStable_StablePtr_static_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Izh_con_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Czh_con_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info"
            "-Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info"
            "-Wl,-u,base_GHCziPtr_Ptr_con_info"
            "-Wl,-u,base_GHCziPtr_FunPtr_con_info"
            "-Wl,-u,base_GHCziStable_StablePtr_con_info"
            "-Wl,-u,ghczmprim_GHCziTypes_False_closure"
            "-Wl,-u,ghczmprim_GHCziTypes_True_closure"
            "-Wl,-u,base_GHCziPack_unpackCString_closure"
            "-Wl,-u,base_GHCziIOziException_stackOverflow_closure"
            "-Wl,-u,base_GHCziIOziException_heapOverflow_closure"
            "-Wl,-u,base_ControlziExceptionziBase_nonTermination_closure"
            "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
            "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
            "-Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure"
            "-Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure"
            "-Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure"
            "-Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure"
            "-Wl,-u,base_GHCziTopHandler_flushStdHandles_closure"
            "-Wl,-u,base_GHCziTopHandler_runIO_closure"
            "-Wl,-u,base_GHCziTopHandler_runNonIO_closure"
            "-Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
            "-Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
            "-Wl,-u,base_GHCziConcziSync_runSparks_closure"
            "-Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure"
pkgroot: "/home/mgsloan/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2"

@domenkozar
Copy link
Contributor

Right, I'd assume that is implicit to the GHC since rts is not even on hackage, so having it on dependency list is confusing to me. But I do understand it's an implementation detail of Cabal to list it.

@mgsloan
Copy link
Contributor

mgsloan commented Aug 7, 2017

@domenkozar It is a dependency of base:

depends:
    ghc-prim-0.5.0.0 integer-gmp-1.0.0.1 rts

It would be inconsistent to not list it, even if it's not on hackage.

@EdmundsEcho
Copy link

EdmundsEcho commented Apr 12, 2018

Quick question:

rts is a dependency of base...

How does stack normally resolve the issue of reading in a depends list from a cabal file where the package does not exist on the LTS server?

Note: I'm aware of the stack documented protocol for how we are supposed to configure stack in this situation; the issue is what happens when we don't control the situation.

My motivation is both to understand the rules, but also because I'm trying to eliminate a warning that keeps occurring when I generate my tag files *warning* unable to fetch an archive for rts-1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants