alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

Remote sources are missing the 'alire.toml' manifest file. #1136

Open Blady-Com opened 2 years ago

Blady-Com commented 2 years ago

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?

mosteo commented 2 years ago

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:

Blady-Com commented 2 years ago

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.

mosteo commented 2 years ago

We could allow --force to work here, yes.