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
File.exists!andPath.exists!#380 #381File.rename!andPath.rename!#377 #379File.time_accessed!,File.time_modified!,File.time_created!#350File.size_in_bytes#347File.is_readable,File.is_executable,File.is_writable#349Sqlite.map_value_result#346Stdout.write_bytesandStderr.write_bytes#329- More and better examples #355 #356 #358 #369 #372 #391 #322 #323 #327
- Docs website for main branch #339
💥 Breaking Changes
- Cmd API overhaul (see upgrade guide below) #397
- No more guaranteed support for ubuntu-20.04 (End of Life) #328
- Changed
Env.VarNotFoundtoEnv.VarNotFound(Str)#398 - Renamed
UnhandledRowserror inSqlitetoRowsReturnedUseQueryInstead
✨ Improvements
- Massively increased test coverage #354 #359 #361 #363 #364 #368 #370 #371 #373
- Tests on more systems #332 #333 #335 #405
- HTTP Request body body does not need to be UTF-8 #343
Url.pathsupports URIs in query parameters #344- Imrpoved docs comments #320
🐛 Fixes
Url.appendfix #363
Other Notable Changes
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.