nikita-volkov/stm-containers

Moving debug dependencies to a flag

bergmark opened this issue · 3 comments

There's no reason for a normal user of stm-containers to have to pull in loch-th and placeholders as far as I can tell. One solution is to add a devel flag that includes these dependencies, another one is to develop with ghci so you don't have to care about what's in the cabal file.

What do you think? I can make a PR if you'd like.

I honestly see no problem here. It's not like I depend on "lens", which brings in a transitive dependency to a whole ecosystem of packages. Both "loch-th" and "placeholders" are very lightweight and I simply consider them as part of what "base" should be and use them in every project of mine.

Besides, not both of those libraries are intended for the development cycle. "loch-th" provides a location-emitting alternative to the standard error function. Hence it's a better idea to use it instead of error, when implementing partial functions, in production too.

I need to be convinced.

I agree with @bergmark that these dependencies should be hidden behind a Cabal flag, in the spirit of keeping packages as lightweight as possible. In fact, the project compiles fine without them right now.

Okay. I've removed the deps