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
File.exists!andPath.exists!#125File.rename!andPath.rename!#125File.time_accessed!,File.time_modified!,File.time_created!#125File.size_in_bytes!#125File.is_readable!,File.is_executable!,File.is_writable!#125Sqlite.map_value_result#112Stdout.write_bytes!andStderr.write_bytes#137- More and better examples #111 #125 #133 #134 #141
💥 Breaking Changes
- Cmd API overhaul (see upgrade guide below) #145
Http.send!now returns aResult- Changed
Env.VarNotFoundtoEnv.VarNotFound(Str)#146 - Renamed
FieldNotFoundtoNoSuchFieldinSqlDecordeErr Tcp.ConnectErrnow takes a type variable parameter to allow for error accumulation #131
✨ Imrovements
- Massively increased test coverage #125 #127 #128 #130 #131 #132 #135 #140 #148
- Test on more systems #98 #99
- HTTP Request body body does not need to be UTF-8 #114
Url.pathsupports URIs in query parameters #115- Better doc comments #116 #131 #132 #137 #146 #148
- Error message improvements #122 #148
🐛 Fixes
- Fix undefined symbols for functions with missing implementations #125
Url.appendfix #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.