Closed thomasbach-dev closed 6 months ago
Hey there, I have two lines of thought regarding this:
--operation-to-generate
and --white-listed-schema
(or --opaque-schema
) to specify what you will actually use because usually you do not need everything in an OpenAPI spec.Hi @joelfisch,
Regarding your first point: yes, it is probably best to generate client bindings only for things you really need. But from an end-user perspective there are quite a few hoops to jump. Also, wouldn't it be nice to just generate bindings and be able to publish on Hackage?
ATM I'm not as enthusiastic and optimistic as I was, when I opened the feature request -- the reason for slow compilation times is probably manifold. I am looking at output files from -ddump-simpl
and in the Types
submodules I see some very huge files. These files are the ones where large records are defined. So, yes, I guess there will be an improvement in compilation time using the large-records library, not sure how much impact it can have, though.
I'll do a quick and dirty implementation to see possible improvements.
I'll close this as it has gone stale, let me know if there are any updates on it.
The compilation time of generated client libraries is way too long. There is some work from Edsko de Vries from Well-Typed on this: https://well-typed.com/blog/2021/08/large-records/.
The investigations lead to the large-records package. I have not used the package yet, but it seems like it could give us a dramatic improvement in compilation times.