haskell-servant / haskell-servant/servant

servant-server has a transitive dependency on blaze-html

Open
#1,187 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

The `servant-server` package has a dependency on `wai-app-static`, which has a dependency on `blaze-html`. I noticed this because `blaze-html` sometimes causes builds to fail on our CI due to timeouts/long compile times. (Caching helps until we need to rebuild the cache).

As far as I can tell, this dependency is included because of the [`Servant.Server.StaticFiles`](https://github.com/haskell-servant/servant/blob/4bd2aa10cd00136c36efb299d8fb65357aed353e/servant-server/src/Servant/Server/StaticFiles.hs) module.

Our usecase for `servant-server` does not include the `StaticFiles` module, and increasing closure size/compilation times feels like it might not be warranted.

Would the Servant maintainers be open for one of the following:

- Shipping the `StaticFiles` module in another package (e.g. `servant-static` or whatever naming is preferred). This is a backwards incompatible change albeit with a single line (?) fix for most users.
- Doing something with Cabal flags so `wai-app-static` becomes an optional dependency of the `servant-server` package. No concrete proposal, I just have a vague idea it might be possible
- Something else entirely that removes this transitive dependency from the `servant-server` package

Opening this ticket to discuss options. I am willing to create a PR; just wanted to gauge interest before sending one.

Thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.