Initial Haskell support
What would you like Renovate to be able to do?
I would like renovate-bot to support Haskell, specially Stackage-based projects using an LTS resolver and extra dependencies from Hackage:
Resolver
An overall configuration point in a Stackage-based Haskell project is the resolver. For example, resolver: lts-major.minor. I would like renovate-bot to find this and suggest an update to (for example) resolver: lts-major.(minor + 1) when it becomes available. There are more resolvers than these LTS versions, but this is our initial use-case.
Hackage
While choosing a resolver defines a strict set of exact versions available, you can make additional dependencies available via extra-deps:
extra-deps:
- some-package-x.y.z@sha256:sha,sizeI would like renovate-bot to compare this to what's available on Hackage and suggest updates accordingly. There are other kinds of dependencies that can be specified here, and the sha256 verification is optional, but this is our initial use-case.
Did you already have any implementation ideas?
Yaml configuration can be declared directly in a file, named stack.yaml by default:
resolver: lts-16.25
extra-deps:
- bugsnag-haskell-0.0.4.0@sha256:44a48e25058e45c8cc351355f6a601d9b4bc6c9895e61e84b4dcd3366302a26b,7395(This path can be changed by configuration, so renovate-bot would have to support that)
Or stack.yaml can point to a different file, with slightly different keys:
# stack.yaml
resolver: ./snapshot.yaml# snapshot.yaml
resolver: lts-16.25
packages:
- bugsnag-haskell-0.0.4.0@sha256:44a48e25058e45c8cc351355f6a601d9b4bc6c9895e61e84b4dcd3366302a26b,7395We would need renovate-bot to:
- Find
stack.yaml[resolver], probably limit things to only work withlts-.*OR<filepath> - If it's pointing to another file, follow that file and read
resolverandpackages - Otherwise, read the
resolverandexra-depsdirectly in this file - Limit things further, to only Hackage dependencies in
packages/extra-deps - Outcome:
resolver = lts-16.25,hackage = [bugsnag-haskell, 0.0.4.1] - Look up latest LTS resolver by following and reading
https://www.stackage.org/lts?_accept=application/json - Outcome:
lts-16.27 - Look up latest for each Hackage item, by following and scraping
https://hackage.haskell.org/package/:name - Outcome:
bugsnag-haskell-0.0.4.1 - Open a PR updating to this resolver and any new Hackage dependencies
# snapshot.yaml
- resolver: lts-16.25
+ resolver: lts-16.27
packages:
- - bugsnag-haskell-0.0.4.0@sha256:44a48e25058e45c8cc351355f6a601d9b4bc6c9895e61e84b4dcd3366302a26b,7395
+ - bugsnag-haskell-0.0.4.1@sha256:...,...A changelog can also be scraped from https://hackage.haskell.org/package/{name}-{version}/changelog, and the https://www.stackage.org/lts?_accept=application/json response includes any changed dependencies, for which changelogs can also be scraped. It would be amazing to include these changelog details in the renovate PR. We have a project that does some of this work here.
I'm willing to try and contribute this support, but I'm having trouble navigating the project enough to know where to add all the moving parts. Would you be able to offer some guidance, given the information above?
Source: renovatebot/renovate