Skip to content

0.13.0

Latest

Choose a tag to compare

@Anton-4 Anton-4 released this 05 Sep 11:47
· 13 commits to main since this release
6ce8f7b

docs

examples

Roc syntax to use this platform:

app [Model, init!, respond!] { web: platform "https://github.com/roc-lang/basic-webserver/releases/download/0.13.0/fSNqJj3-twTrb0jJKHreMimVWD7mebDOj0mnslMm2GM.tar.br" }

🆕 Additions

💥 Breaking Changes

  • Cmd API overhaul (see upgrade guide below) #145
  • Http.send! now returns a Result
  • Changed Env.VarNotFound to Env.VarNotFound(Str) #146
  • Renamed FieldNotFound to NoSuchField in SqlDecordeErr
  • Tcp.ConnectErr now takes a type variable parameter to allow for error accumulation #131

✨ Imrovements

🐛 Fixes

  • Fix undefined symbols for functions with missing implementations #125
  • Url.append fix #128
  • Fixed Sqlite segmentation fault #110

Other Notable Changes

  • Update rust dependencies #101 #121
  • CI check to verify if common files are in sync with basic-cli #139

Full Changelog: 0.12.0...0.13.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.