alire
alire copied to clipboard
Remote sources are missing the 'alire.toml' manifest file.
In order to give users access to old versions, I want to create a publication of an anterior version 2.1 bound to a specific commit: bld% alr -d publish https://github.com/Blady-Com/gnoga.git d6ca17ebdb37204ba7630f3db860132a32272874 ... stderr: Remote sources are missing the 'alire.toml' manifest file expected at /Users/me/gnoga-code-alr/alire/tmp/alr-ektp.tmp/alire.toml stderr: ADA.IO_EXCEPTIONS.USE_ERROR
Why alr needs alire.toml in the crate commit and couldn't cope with local alire.toml?
This is a "soft" error in the sense that the check is done locally in your computer, because we want to encourage all new submissions to contain a manifest remotely so a release can be cloned/pinned and still be an Alire crate. However, the server side checks won't enforce it, and the resulting release will be usable without issue within Alire.
You have a few options here:
- If it's not critical to keep the same commit, you can simply branch at that point, add the manifest, and publish the resulting commit. That would be the most simple and desirable route. If you don't want to keep the branch in the repo, you can just tag the commit so it's not garbage-collected by git after deleting the branch.
- If you want to absolutely keep the same commit, since
alr publish
won't let you finish, you can use any other commit that includes the manifest to generate a sample manifest for the index, modify it by hand to point to the desired commit, and submit that to the index. - Or you can patch
alire-publish.adb:389-396
to remove that check, build alr from sources, and publish the actual commit you want normally.
Thanks for your answer. Well, ok for first option, I will create a branch on the relevant commit however I have to do that for a couple of version :-( In order to avoid hacks (option 2 or 3), when it isn't possible to create a dedicated branch, would not be useful to offer an option to force the publication? Moreover, It would be very useful in case of an archive which doesn't contain alire.toml.
We could allow --force
to work here, yes.