stack.yml
but I don't know if that would be poor form
Exception while reading snapshot from lts-14.12:
HttpExceptionRequest Request {
host = "raw.githubusercontent.com"
port = 443
secure = True
requestHeaders = [("User-Agent","Haskell pantry package")]
path = "/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(InternalException (HostCannotConnect "raw.githubusercontent.com" [Network.Socket.connect: <socket: 13>: does not exist (Connection refused)]))
setup-info: "http://mirrors.tuna.tsinghua.edu.cn/stackage/stack-setup.yaml"
urls:
latest-snapshot: http://mirrors.tuna.tsinghua.edu.cn/stackage/snapshots.json
package-indices:
- download-prefix: http://mirrors.tuna.tsinghua.edu.cn/hackage/
hackage-security:
keyids:
- 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d
- 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42
- 280b10153a522681163658cb49f632cde3f38d768b736ddbc901d99a1a772833
- 2a96b1889dc221c17296fcc2bb34b908ca9734376f0f361660200935916ef201
- 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3
- 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921
- 772e9f4c7db33d251d5c6e357199c819e569d130857dc225549b40845ff0890d
- aa315286e6ad281ad61182235533c41e806e5a787e0b6d1e7eef3f09d137d2e9
- fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0
key-threshold: 3 # number of keys required
# ignore expiration date, see https://github.com/commercialhaskell/stack/pull/4614
ignore-expiry: no
btnz@vmubuntuserver:~$ wget https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
--2019-10-30 02:12:07-- https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.59.149.136
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.59.149.136|:443... failed: Connection refused.
btnz@vmubuntuserver:~$ wget https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
--2019-10-30 02:12:31-- https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 31.13.65.17
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|31.13.65.17|:443... failed: Connection refused.
btnz@vmubuntuserver:~$ wget https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
--2019-10-30 02:14:46-- https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 67.228.74.123
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|67.228.74.123|:443... failed: Connection refused.
btnz@vmubuntuserver:~$ wget https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
--2019-10-30 02:16:26-- https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/12.yaml
btnz@vmubuntuserver:~$ stack update
Selected mirror http://mirrors.tuna.tsinghua.edu.cn/hackage/
Downloading root
Selected mirror http://mirrors.tuna.tsinghua.edu.cn/hackage/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index
Updated package index downloaded
Calculating hashes to check for hackage-security rebases or filesystem changes
No old cache found, populating cache from scratch
Populating cache from file size 632057344, hash 12df935d511eb0000b2755731539acf68d09cd10539b17f83f7e5ac9c37edc99
Populating package index cache ...
Package index cache populated
btnz@vmubuntuserver:~$
btnz@vmubuntuserver:~$
btnz@vmubuntuserver:~$ stack setup
Warning: http://mirrors.tuna.tsinghua.edu.cn/stackage/stack-setup.yaml: Unrecognized field in GHCDownloadInfo: version
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.6.5.
rts-1.0: Warning: .:466:1: The field "hugs-options" is deprecated. hugs isn't supported anymore
Installed GHC.
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
btnz@vmubuntuserver:~$
Hi! I'm new to Haskell, and I just used Stack to install Yesod. There were a bunch of warnings, and I'm trying to figure out if they're warning about Stack itself or Yesod (or both?). I'd be happy to try to help clean some of them up, if I can. Two examples:
x509-validation > /tmp/stack13015/x509-validation-1.6.11/Data/X509/Validation.hs:34:1: warning: [-Wunused-imports]
x509-validation > The import of ‘Control.Applicative’ is redundant
x509-validation > except perhaps to import instances from ‘Control.Applicative’
x509-validation > To import instances alone, use: import Control.Applicative()
x509-validation > |
x509-validation > 34 | import Control.Applicative
x509-validation > | ^^^^^^^^^^^^^^^^^^^^^^^^^^
x509-validation >
I figure that one (the one above) is validating Yesod, and found that in Yesod. But what about:
unix-time > /tmp/stack13015/unix-time-0.4.7//usr/include/features.h:184:3: error:
unix-time > warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
unix-time > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
unix-time > ^~~~~~~
unix-time > |
unix-time > 184 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
unix-time > | ^
Thanks!
Why does stack (and also cabal?) have such a limitation?
Cannot use 'stack ghci' with both file targets and package targets
I got annoyed when I tried to load my package and its example code (not included in the package) at the same session of stack ghci
.
I learned it can be easily avoided by typing :add path/to/example.hs
after launching stack ghci
.
So why doesn't stack do it automatically?
Anyone with experience building static binaries with stack?
I'm getting a pesky
<command line>: User-specified static library could not be loaded (/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libpgport.a)
Loading static libraries is not supported in this configuration.
Try using a dynamic library instead.
when doing stack build --ghc-options='-fPIC -lpgport -lpgcommon' :aws-sync
with
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
ld-options: -static
extra-lib-dirs:
- ./lib/gmp-6.1.2/.libs
- ./lib/postgres/src/interfaces/libpq
- ./lib/postgres/src/common
- ./lib/postgres/src/port
static-haskell-nix
I ended up getting blocked on nh2/static-haskell-nix#22, because I need libpq
. There is a workaround, but my case is not that pressing, so I'll wait for upstream. nh2/static-haskell-nix#62 if you want to follow the issue which is blocked upstream by https://gitlab.haskell.org/ghc/ghc/issues/17468.
static-haskell-nix
was quite plug-and-play except for upstream issues, @nh2 has been doing tremendous work.
packages
defined anywhere so I wonder why the warning. There is no package.yaml either.