gleam icon indicating copy to clipboard operation
gleam copied to clipboard

Add gleam hex revert

Open Pi-Cla opened this issue 9 months ago • 4 comments

A new package can be reverted or updated within 24 hours of it's initial publish, a new version of an existing package can be reverted or updated within one hour.

Resolves #3019

Pi-Cla avatar May 01 '24 22:05 Pi-Cla

I did some live testing on my gling package and it looks like it worked! :D https://hex.pm/packages/gling

Pi-Cla avatar May 01 '24 22:05 Pi-Cla

I ended up having to make revert a subcommand because if I tried to make it like:

gleam publish --revert [VERSION]

where --revert and [VERSION] is optional then I end up with the type Option<Option<String>> which Clippy does not like.

This would then require that whenever any part of the code was processing the full double option to add a line to silence clippy else clippy would complain.

Pi-Cla avatar May 01 '24 23:05 Pi-Cla

I ended up having to make revert a subcommand because if I tried to make it like:

gleam publish --revert [VERSION]

where --revert and [VERSION] is optional then I end up with the type Option<Option<String>> which Clippy does not like.

This would then require that whenever any part of the code was processing the full double option to add a line to silence clippy else clippy would complain.

Thanks for doing this! Note: The changelog is now not in sync.

inoas avatar May 03 '24 08:05 inoas

Thank you!

Let's make this gleam hex revert to match gleam hex retire.

Oh I missed this comment. Ok now it matches the other gleam hex commands. I also added the option to specify which package to revert

Pi-Cla avatar May 04 '24 09:05 Pi-Cla