-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Initial Haskell support #8187
Comments
Thanks @pbrisbin for the proposal. Logically here's how we'd approach an implementation: DatasourcesIs there a need to access new APIs to retrieve versions of packages? In this case it seems like Hackage is needed. It would go into VersioningDoes Haskell use its own syntax to define versions or constraints/ranges? I'm seeing "pinned" versions with digests in your examples so maybe our "loose" versioning would work fine for things like ManagerThe minimum you need to implement is a manager (e.g. Is there any separate "artifacts" files that need updating, e.g. checksum or lock files? ChangelogCurrently our changelog only supports github and gitlab sources, but it sounds like they are published to the registry itself for Hackage? Do any packages also publish to a changelog file in their github source? |
It does, called the PVP. In short, it defines a 4-part version
In case it's helpful, in my own packages, I set
Yes, a (Note that this is just one way to specify dependencies in a Haskell project, so building this support in the way I describe would only support Haskell projects that choose this tooling. I'm happy to describe other approaches, if you're interested in understanding the broader space.)
Ah yes, in fact. There is a
Sort of both:
(Project README's are handled similarly.) |
I think we'll need a new versioning to handle If there's a lock file then it means we'd want to support "artifacts" updating like quite a few other managers. For changelogs, they might "just work" if the majority of packages (a) define their source repo in metadata, and (b) include a changelog file. It doesn't look like we'll need to use the registry's changelogs. I'd recommend doing this in this order, in separate PRs:
Steps 1 & 2 won't really achieve much on their own, but it's easier to do this incrementally than all in one go. |
Awesome, thanks. Granular steps make total sense, even if the first few don't actually get us there. |
Hi there, You're requesting support for a new package manager. We need to know some basic information about this package manager first. Please copy/paste the new package manager questionnaire, and fill it out in full. Once the questionnaire is filled out we will evaluate if adding support for this manager is something we want to do. Good luck, The Renovate team |
NOTE: I'm answering this questionnaire for the feature of specifically stack-related dependencies. If we want to automatically manage version bounds in a non-Stack project, or library making use of such bounds in its New package manager questionnaireDid you read our documentation on adding a package manager?
BasicsName of package managerStack. What language does this support?Haskell. How popular is this package manager?Probably >50% of Haskell projects us it. Does this language have other (competing?) package managers?
Package File DetectionWhat type of package files and names does it use?
What fileMatch pattern(s) should be used?Can Is it likely that many users would need to extend this pattern for custom file names?
Possible, but not likely, IMO. Is the fileMatch pattern likely to get many "false hits" for files that have nothing to do with package management?No. Parsing and ExtractionCan package files have "local" links to each other that need to be resolved?Yes, Is there a reason why package files need to be parsed together (in serial) instead of independently?I can't think of one. What format/syntax is the package file in?
How do you suggest parsing the file?
Does the package file structure distinguish between different "types" of dependencies? e.g. production dependencies, dev dependencies, etc?
List all the sources/syntaxes of dependencies that can be extractedIn In the case of a path to a custom snapshot, you will find in that file a
Describe which types of dependencies above are supported and which will be implemented in futureVersioningWhat versioning scheme does the package file(s) use?Snapshots, use two formats:
Non-git
Does this versioning scheme support range constraints, e.g.
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as spam.
This comment was marked as spam.
Since part of this discussion is about adding a Hackage data source, I thought I'd link #31434, which contains such a data source. Since the data source is necessary for both Cabal and Stack support, maybe we can consolidate our efforts. The PR was closed because we need to discuss requirements first. @secustor requested that I discuss the manager first, so that what I am focusing on in #31493 . @rarkins Wouldn't it be ok if an initial version of the Hackage data source didn't support digests? Hash pinning is optional in @pbrisbin Are you still interested in implementing this? What do you think about the data source I drafted, do you think it could help you? |
you should start on versioning. then datasource and finally on manager. |
@viceice Your order is inconsistent with what I was suggested in #31434 (which is to discuss the manager first). Also, not everyone uses PVP. So I don't understand why versioning need to be done first. |
I read #31434 (comment) differently. It says "discuss manager first, then implement version, datasource, manager in that order in separate PRs". |
I think #32298 with PVP support might get merged soon-ish, and I have the datasource PR ready, which I will submit at that point. |
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
:I 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:(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:We would need renovate-bot to:
stack.yaml[resolver]
, probably limit things to only work withlts-.*
OR<filepath>
resolver
andpackages
resolver
andexra-deps
directly in this filepackages
/extra-deps
resolver = lts-16.25
,hackage = [bugsnag-haskell, 0.0.4.1]
https://www.stackage.org/lts?_accept=application/json
lts-16.27
https://hackage.haskell.org/package/:name
bugsnag-haskell-0.0.4.1
A changelog can also be scraped from
https://hackage.haskell.org/package/{name}-{version}/changelog
, and thehttps://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?
The text was updated successfully, but these errors were encountered: