theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
269 stars 48 forks source link

Document that static linking is not supported on MacOS #95

Open NickSeagull opened 3 years ago

NickSeagull commented 3 years ago

Per #41, some users are having trouble with static linking on MacOS, this is because MacOS doesn't support it.

A MacOS user should work in "development mode" without adding the cabal options related to static linking, and only add them when ready to deploy by building with stack build --docker

dnikolovv commented 3 years ago

Static linking at this point in time is very very painful with Haskell. It works for simpler use-cases but fails the moment your project gets a tad bigger.

On the project I work atm we go around that by using the lambci/lambda:build-provided Docker image. We install the extra libraries needed and then copy them and ship them together with the bootstrap executable.

That would also be a great thing to document, as the errors that arise from getting it wrong are very unpleasant, to say the least.