Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Kirill Zaborsky
    @qrilka
    @hovind the easiest way to get a proper static build probably is https://github.com/nh2/static-haskell-nix e.g. Stack uses it for its static builds
    hovind
    @hovind
    @qrilka Thanks, will check it out!
    Alexander Korablev
    @kor85
    @hovind are you succeeded with static libraries?
    hovind
    @hovind
    Using 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.
    hovind
    @hovind
    @kor85
    Matthieu Coudron
    @teto
    Hi, I hit the issue "You cannot have packages and a shell-file filled at the same time in your nix-shell configuration." with stack 2.3.1 and this stack.yaml
    resolver: lts-13.19 nix: enable: true shell-file: shell.nix
    there is no packages defined anywhere so I wonder why the warning. There is no package.yaml either.
    Kirill Zaborsky
    @qrilka
    @teto there is a possibility that packages are defined in your .stack/config.yaml
    also verbose log of Stack could shine some light maybe (but not sure in this case)
    Matthieu Coudron
    @teto
    @qrilka how can I get verbose logs ? I've tried several flags from stack --help without success
    Paolo G. Giarrusso
    @Blaisorblade
    doesn’t stack take --verbose? but flag order might make a difference (I forget)
    double-checking.
    Paolo G. Giarrusso
    @Blaisorblade
    Yeah, it's --verbose
    Matthieu Coudron
    @teto
    $ 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.
    Matthieu Coudron
    @teto
    I ended up running strace and stack looks into various folders including ~/.stack which indeed contains packages. verbose not very helpful there
    Kirill Zaborsky
    @qrilka
    @teto you didn't answer about ~/.stack/config.yaml
    does it have packages in it?
    and what does stack.yaml contain?
    Matthieu Coudron
    @teto
    ~/.stack/config.yaml did contain packages. It works now
    Kirill Zaborsky
    @qrilka
    great to hear that it was resolved
    Robin
    @robinvd

    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

    Arian van Putten
    @arianvp
    Hey quick question
    now with pantry; is there any semantic difference between putting things in a snapshot vs putting them in extra-deps in stack.yaml?
    Loutine
    @Loutine
    hey guys,I'm new to haskell and I'm following the turtorial of "learn haskell" try to use stack to install ghc
    1 reply
    but there's something wrong when I try to "stack setup"
    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)]))
    I tried to use a http_proxy but still not work
    this is my environment
    Arch linux
    stack Version 2.3.1, Git revision de2a7b694f07de7e6cf17f8c92338c16286b2878 (dirty) (8103 commits) x86_64
    Loutine
    @Loutine
    And because I'm a student in china I'm using the configuration mentioned in install_and_upgrade.md
    Simon Hafner
    @reactormonk
    Is there a way to build a benchmark binary and copy it out? i don't seem to be able to get a hold of it.
    Jens Petersen
    @juhpetersen_gitlab
    Does stack (now?) drop a new build cache when the initial build fails?
    I better check github issues
    Jens Petersen
    @juhpetersen_gitlab
    Not sure, maybe it was a local issue or some corner case
    Marcin Rzeźnicki
    @marcin-rzeznicki
    Hey - is it possible to profile a stack 'script' ?
    Matthieu Coudron
    @teto
    hi guys, I am trying to get https://github.com/haskell/haskell-language-server#features built by bazel. I can't get stack.yaml to fetch the submodules so everything fails. Here is an excerpt from my stack.yaml:
    packages:
    - github: haskell/haskell-language-server
      # 0.4 release
      commit: 0a18edde24923251a148cbbc0ae993a6aac83b9c
      sha256: e965019bc48ef75e43992b209055e55b245faaaede04c02fb4825f124ebc3dd1
      subdirs:
        - .
        - ./ghcide/
        - ./hls-plugin-api
    Javier Neira
    @jneira
    hls contributor here, I think you should be able to build it moving ghcide to extra-deps, as it was uploaded to hackage
    Matthieu Coudron
    @teto
    thanks, I found a workaround
    Javier Neira
    @jneira
    he I be just noticed the date 🤦‍♂️
    Matthieu Coudron
    @teto
    I am trying to run commands from https://github.com/theam/aws-lambda-haskell-runtime/blob/master/doc/06-deploying-a-lambda.md#manual-deploy but it fails with Cannot use both Docker and Nix at the same time . Wha'ts wrong with using docker from within a nix-shell ?
    Matthieu Coudron
    @teto
    oh it's not because of the nix-shell, I can't use it anywhere (using nixos) :/
    Kirill Zaborsky
    @qrilka
    @teto this binary choice between nix/docker was done in commercialhaskell/stack#4636 and commercialhaskell/stack#4647 - I guess those links should give you some info about the motivation
    Matthieu Coudron
    @teto

    Kind of a follow up but I get

    $ stack build --no-nix --docker
    Resolver not supported for Docker images:
        no resolver specified
    Use an LTS resolver, or set the 'image' explicitly, in your configuration file.

    with this package.yaml (taken from https://notquiteamonad.com/blog/2021-02-15-writing-aws-lambdas-in-haskell)

    # package.yaml
    
    resolver: lts-16.31
    
    executables:
      getSecret:
        main: Main.hs
        source-dirs: src/
        dependencies:
          - hal # This project's library
          - amazonka # This project's library
          # --snip--
        ghc-options:
          - -threaded
          - -rtsopts
          - -O2
          - -static
          - -with-rtsopts=-N
          - -Wall
        cc-options: -static
        # ld-options: -static -pthread

    What strikes me is that I see 0 results on google

    Matthieu Coudron
    @teto
    If I pass the resolver on command line it works stack build --no-nix --docker --resolver lts-16.31 :) but then I hit Cannot determine project root directory for Docker sandbox.
    Matthieu Coudron
    @teto
    nevermind seems like stack.yml is mandatory and the resolve should have been there in the first place
    Matthieu Coudron
    @teto
    btw has stack no manpage :'( ?
    Mihai Maruseac
    @mihaimaruseac
    stack help
    wygulmage
    @wygulmage
    Anyone have success using recent versions of stack with wsl1? It seems to have switched to locking with fdLock, with is not supported by wsl1. I'm trying to find the sweet spot of a stack version that can still download resolvers (i.e., at least greater than 1.9) but that does not use fdLock.
    wygulmage
    @wygulmage
    Well, the downside is I haven't figured out how to keep using stack in WSL 1. The upside is that cabal-install is about a million times better than it was when I switched to stack!