-
Notifications
You must be signed in to change notification settings - Fork 56
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
Why not use the "Internals" convention? #95
Comments
Citing #86 (comment):
I absolutely agree. I've never argued against having the lower-level APIs exposed. However, my point which you seem to be missing is that it doesn't necessarily have to be done with a hack to package versioning, which the "Internals" convention is. There are other methods! Take a look at "postgresql-binary". I've only developed that package when I was working on "hasql". It could just as well be hidden in the internal modules of "hasql". But you get the full access to its functionality, while "hasql" still doesn't have any "Internals" modules. Take a look at my other package - "potoki", it is basically a bunch of reexports from "potoki-core". "potoki" provides an API with closed abstractions and that API is targeted towards the general users of the whole "potoki" ecosystem. "potoki-core" has all the abstractions exposed and provides all the low-level features required for creating other packages of the ecosystem like "potoki-hasql". Can you see? The lower-level details can be exposed without the ugliness of "Internals". The community would benefit a heck of a lot if the basic packages like "text" or "bytestring" were distributed like that. It is all about the audience of the package: in all the mentioned packages the internals are only needed by a few people doing the hardcore stuff, while the majority needs not to be bothered or otherwise affected by them. This is two separate audiences! Separate audiences need separate distributions. This is not all that is wrong with the "Internals" convention. The convention goes against all the benefits of having semantic versioning. The users expect package versions in the |
Unless I am missing something, while postgresql-binary does expose enough to write parsers for what I discussed, because the As an exercise, you should try making a new package which has hasql as a dependency and see if you can write what I was trying to do. I would love to be wrong, but I think you'll find that you either have to resort to the hack I have, or have to use Edit: Now I'm looking into this more deeply again, it looks like what I'm after should be possible with: timestamptzThyme = custom (bool (valueParser A.timestamp_float) (valueParser A.timestamp_int)) which is less painful than I expected - has this changed since I originally filed the bug? I don't remember seeing |
Can you please move your post to the "Export Hasql.Private.Decoders.Value.Value to allow for other time libraries" issue? It's unrelated to the topic of this thread and I'm trying hard to keep the discussions structured and up to the topic, which is the reason I've isolated this thread in the first place. I'll answer in the mentioned issue. |
@nikita-volkov would you be in favor of a |
Sure. I would. If we discover there is a real need for it. In case of the #144 I don't see the need, because the issue seems resolvable with the existing API. Possibly, I'm missing something, but let's discuss it there. |
People keep asking to reveal some internal modules using the "Internals" convention. E.g.,
This thread is intended for an isolated discussion of that subject particularly.
In summary, my position is that the Internals conventions is a mistake.
The text was updated successfully, but these errors were encountered: