dune-release failing on readthedocs documentation
dune-release: [ERROR] readthedocs-dune-release-delegate: package delegate
cannot be found. Try dune-release help delegate for
more information.
Indeed, dune-release shouldn't use doc or homepage but dev-repo only to determine whether it should follow the github workflow or leave the work to a delegate.
As a matter of fact, it probably shouldn't try to guess if a delegate should be used at all and let the user explicitly specify it.
Is there still a need for delegates at all? I think the idea of users extending dune-release this way was not adopted by users. We might as well just concentrate on supporting the few common use cases. This is dune's philosophy elsewhere as well.
I'd love to use delegates for releases which aren't targeting public github repos.
Are you talking about making releases to private github instances? That should be easy enough to support by setting the github url, no?
If that works without delegates then I'm fine with that approach. I'll try to test this week. Thanks for the pointer!
@hcarty note that this is currently not supported as dune-release unfortunately builds a lot of URLs by hand, assuming repos are hosted on github.com.
Could you please detail your use case here?
If it is indeed just a github workflow transposed to a different host then we should be able to work something out that will be easier to both maintain and use than delegates!
I have two cases I'd like to be able to use. One is a private github instance. The other is publishing release archives to hosting other than github, regardless of where the project lives.
I can work around both of these if necessary. I'm currently doing the (internal) release process manually and using tags as the opam package source for these packages. Maybe using git tags and/or specific commit hashes rather than release packages as the source for an opam release could be a dune-release option which would work with a lot of different git source hosting options?
IMHO, if you have a custom release process, it would be far simpler to just wire up a simple script to upload tarballs than to mess around with delegates. Our current plan with dune-release is to move it directly to dune. This means that it will have to shed some weight and become a little more opinionated to make the common cases as smooth as possible. If this means losing some rarely used features, I think that's a good trade-off.
@rgrinberg agreed - I withdraw any concerns over the removal of delegates. Thank you for the thoughtful replies!
Came across this today when attempting to use mirage.docs.io in an opam file. FWIW, the current state is quite confusing as dune-release will claim not to be able to parse the doc field, then attempt to use a delegate anyway:
❭ dune-release
[-] Building source archive
[+] Wrote archive _build/either-1.0.0.tbz
[-] Linting distrib in _build/either-1.0.0
[ OK ] File README is present.
[ OK ] File LICENSE is present.
[ OK ] File CHANGES is present.
[ OK ] File opam is present.
[ OK ] lint opam file either.opam.
[ OK ] opam field description is present
[ OK ] opam fields homepage and dev-repo can be parsed by dune-release
[FAIL] opam field doc cannot be parsed by dune-release
[ OK ] lint _build/either-1.0.0 success
[-] Building package in _build/either-1.0.0
Done: 47/51 (jobs: 1)[ OK ] package builds
[-] Running package tests in _build/either-1.0.0
Done: 0/0 (jobs: 0)[ OK ] package tests
[+] Distribution for either 1.0.0
[+] Commit 50e276e0a913fab21227671817cd65d10819eb1d
[+] Archive _build/either-1.0.0.tbz
[-] Publishing documentation
[-] Selected packages: either
[-] Generating documentation from _build/either-1.0.0.tbz
Done: 27/30 (jobs: 1)dune-release: [ERROR] mirage-dune-release-delegate: package delegate cannot be found. Try `dune-release help delegate` for more information.
We're well aware of this issue and have a plan to fix it in 2.0.0! Sorry about the inconvenience!
I was surprised to also get this error when just trying to publish the distribution archive without documentation (dune-release publish distrib). Apparently it still looks at the doc field and prefers that.
Digging through dune-release sources I found the following workaround:
DUNE_RELEASE_DELEGATE=github-dune-release-delegate dune-release publish distrib
Hopefully this will be useful to others hitting this issue until dune-release 2.0.0.
We're well aware of this issue and have a plan to fix it in 2.0.0! Sorry about the inconvenience!
Looks like 2.0.0 quietly got released recently but this issue remains open. Confusingly, the 2.0.0 milestone is still open with lots to be done and this issue isn't even part of it.
Yeah, sorry about that. It was time to cut a 2.0.0 release with whatever we had. I've renamed the milestone to 3.0.0 and added this issue to it.