-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Upgrade haskell-servant generator to latest LTS #1469
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
Conversation
- Upgrade Servant to the latest version - Add Maybe for optional values - Add UUID, UTCTime and Day types - Fix the URL configuration so that it has one param with all data - Add Data and ToSchema instances to models - Switch to TLS http manager so it can connect to https urls - Add nicer API to call the endpoints - Add Nix support
cc @jonschoning, @algas to see if they've time to do a review on the change. |
definitely looks like an improvement over the old bitrotted code.
|
@jonschoning thanks for the review!
|
dcf4e30
to
5729960
Compare
looks good to me |
@jonschoning thanks for reviewing the change. @f-f thanks for the enhancement, which has been merged into master. |
@f-f thanks again for the contribution, which has been included in the 4.0.0-beta release: https://twitter.com/oas_generator/status/1079727020374806529. Happy New Year and looking forward to more collaboration and contributions in 2019! |
* [Haskell Servant] Upgrade to lts-12 - Upgrade Servant to the latest version - Add Maybe for optional values - Add UUID, UTCTime and Day types - Fix the URL configuration so that it has one param with all data - Add Data and ToSchema instances to models - Switch to TLS http manager so it can connect to https urls - Add nicer API to call the endpoints - Add Nix support * [Haskell Servant] Upgrade Petstore * [Haskell Servant] Delete old swagger-petstore samples * [Haskell Servant] Use generics for ToForm and FromForm instances * [Haskell Servant] Generate ToSchema instance only if it's safe to do
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.4.x
,4.0.x
. Default:master
.Description of the PR
Problem: the current
haskell-servant
client is based on a set of libraries (lts
package set) from one year ago, based on the8.0.x
release of GHC. It is typical for library writers in the Haskell community to maintain compatibility with the latest 3 major versions of the compiler. By this standard (since8.2
,8.4
and8.6
are out) we are generating an outdated client. Moreover, theservant
library itself went through several breaking versions in the meanwhile, so the code generated by this generator is not really compatible with a project started today.This PR upgrades to the latest
lts
(12.18 for GHC 8.4) andservant
version, and adds several new features:Maybe
sUUID
,UTCTime
andDay
are now represented with the correct typesurl
ToSchema
instances to generated types, so they can be re-exposed for free in the spec of the service using the clienttls-http-manager
, so we can connect to https urlsstack.yaml
Note: all of this is quite breaking, so I opened the PR against the
4.x
branch/cc @wing328