Search code examples
haskellyesodhaskell-stackhaskell-warp

Force Yesod to use newer version of Warp


I installed Yesod using Stack. It currently uses Warp v3.2.11.1, but I want it to use the latest version available on GitHub (it hasn't been released yet). I added the following to my stack.yaml file:

packages:
- '.'
- location:
    git: [email protected]:yesodweb/wai.git
    commit: 9fd0dcf221e4946d3588eea3ccd87492ca718d6a
  extra-dep: true
  subdirs:
    - warp

When I import Warp in Application.hs and print the Warp version, I get 3.2.11.2, but when I make HTTP requests to my server, the "Server" response header is "Warp/3.2.11.1", which means that Yesod is still using the old version of Warp. How can I force Yesod to use the newer version?


Solution

  • I have been using stack exec -- yesod devel to run my server, and apparently this was causing the problem. When I run the executable built by stack, it works fine.