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.
$ stack --stack-yaml=./stack.yaml build --verbose
2.1.3.1 x86_64 hpack-0.33.0
2020-02-15 19:21:33.643425: [debug] Loading project config file stack.yaml
2020-02-15 19:21:33.644059: [error] You cannot have packages and a shell-file filled at the same time in your nix-shell configuration.
packages
in it?
stack.yaml
contain?
I want to staticly link a '.a' (from rust) into the binary but cant seem to get it to work. Are there any resources on this?
i have tried
extra-libraries:
- nameoflib
extra-lib-dirs:
- /locoflib/
but this only works with absolute paths, and i need a relative path as the other project is in the same repo and distributed along with it
extra-deps
in stack.yaml?
Exception while reading snapshot from lts-15.12:
HttpExceptionRequest Request {
host = "raw.githubusercontent.com"
port = 443
secure = True
requestHeaders = [("User-Agent","Haskell pantry package")]
path = "/commercialhaskell/stackage-snapshots/master/lts/15/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: 14>: does not exist (Connection refused),Network.Socket.connect: <socket: 14>: does not exist (Connection refused)]))