Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !1469
An error occurred while fetching the assigned milestone of the selected merge_request.

Upgrade haskell-servant generator to latest LTS

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/f-f/upgrade-haskell-servant into 4.0.x 6 years ago
  • Overview 0
  • Commits 5
  • Pipelines 0
  • Changes 15

Created by: f-f

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./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\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

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 the 8.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 (since 8.2, 8.4 and 8.6 are out) we are generating an outdated client. Moreover, the servant 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) and servant version, and adds several new features:

  • optionals are now Maybes
  • UUID, UTCTime and Day are now represented with the correct types
  • the configuration for the client now contains only one parameter, the url
  • add ToSchema instances to generated types, so they can be re-exposed for free in the spec of the service using the client
  • switch to the tls-http-manager, so we can connect to https urls
  • add Nix support in the stack.yaml
  • add a nicer API to call the endpoints

Note: all of this is quite breaking, so I opened the PR against the 4.x branch

/cc @wing328

Activity

Please register or sign in to reply

There are currently no pipelines.

To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines.

0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference:
Source branch: github/fork/f-f/upgrade-haskell-servant

Menu

Explore Projects Groups Snippets