-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building on opaleye but also depending on hasql seems surprising #326
Comments
Yes, I wouldn't really say Opaleye is "built on" However, I'm not sure that gains a lot, since the I think the transitive dependencies of If you want to see if |
It looks like #325 is unrelated to Yes you bring up a fair point, in terms of true consequences, the extra dependency doesn't seem to have any real downsides (giving the ick, as the kids say, doesn't really count 😉). To narrow this to focusing on material tradeoffs, I do stand by the other portion of my statement pointing out the upsides of having I'm quite biased by my own experiences from the last 48 hours of becoming a |
@tysonzero not sure if it's still relevant, but I've got https://hackage.haskell.org/package/hasql-resource-pool if you need both the resource-pool and hasql, it derives from a time when hasql-pool had a |
Just to add another perspective: Opaleye covers a lot of common SQL cases. For those special situations where one, for instance, wants to perform a "SELECT-valued INSERT or UPDATE", it makes sense to drop down into something like Note: I haven't tried to do any unsupported things; I am just thinking ahead for the case where I inevitably do. Basing the above example off of the comment in the
|
Opaleye itself is already built on postgresql-simple, so it seems a bit strange to me to build on top of opaleye but use hasql, leading to rel8 having both as (transitive) dependencies. It also seems to mean that using opaleye and rel8 in parallel at all, such as migrating from one to the other or using one to cover missing features in the other, is quite a bit harder. It also increases the mental overhead of switching, as you have to get used to a different connection/pooling/transaction/etc. system.
The dependency story could perhaps be resolved via
opaleye-core
/opaleye-simple
/opaleye-hasql
type package splitting, as I presume even though rel8 depends on opaleye and opaleye depends on postgresql-simple, that rel8 doesn't actually directly use any part of opaleye that uses postgresql-simple.Of course if opaleye is convinced to go down this route, a similar argument could be made for
rel8
doing the exact same thing, which may have side benefits like additional robustness in the presence of bugs inhasql
. In my case I would have liked to tryrel8-simple
to see if it would have fixed #325.The text was updated successfully, but these errors were encountered: