Skip to content

0.20.0

Latest

Choose a tag to compare

@Anton-4 Anton-4 released this 29 Aug 10:04
· 9 commits to main since this release
33e1070

docs

examples

Roc syntax to use this platform:

app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.20.0/X73hGh05nNTkDHU06FHC0YfFaQB1pimX7gncRcao5mU.tar.br" }

🆕 Additions

💥 Breaking Changes

  • Cmd API overhaul (see upgrade guide below) #397
  • No more guaranteed support for ubuntu-20.04 (End of Life) #328
  • Changed Env.VarNotFound to Env.VarNotFound(Str) #398
  • Renamed UnhandledRows error in Sqlite to RowsReturnedUseQueryInstead

✨ Improvements

🐛 Fixes

  • Url.append fix #363

Other Notable Changes

  • Update rust dependencies #365
  • CI check to make sure all exposed functions are tested #351

Full Changelog: 0.19.0...0.20.0

Contributors ❤️

In alphabetical order:

Cmd Upgrade Guide

Cmd.status! was commonly used when you just wanted to execute a Cmd without needing to process the output.
We now have the better named Cmd.exec_cmd! for this purpose.
The type of Cmd.status! also delivered the impression that it it could return non-zero exit codes like Ok(1), when this was not actually the case. I've regularly seen code where people checked if the exit code returned by status was 0, if you did, you can get rid if that now :) . If you actually want to take action based on the specific non-zero exit code (which is rarely needed), you can now use Cmd.exec_exit_code.

For all exec... functions, we now use Result in a more logical way, if the command had a 0 exit code, it will return with Ok(...). If not, you will get a specific error that will show useful info on Inspect.to_str. Perfect for error handling in hobby programs.

If you previously used Cmd.output!, you should most likely replace that with Cmd.exec_output!. Note the different output type, it should help simplify output and error handling.