Skip to content

Releases: roc-lang/basic-cli

0.19.0

28 Jan 12:35
fae5769
Compare
Choose a tag to compare

docs

examples

Roc syntax to use this platform:

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

Breaking changes

New features

  • Sqlite support #299

Other notable changes

  • rust_host_bin: pass -Wl,-headerpad,0x1000 to reserve space for the surgical linker #313
  • Make path_from_roc_path pub for Windows by #318

Contributors ❤️

In alphabetical order:

Full Changelog: 0.18.0...0.19.0

0.18.0

28 Dec 10:27
0.18.0
029a324
Compare
Choose a tag to compare

docs

examples

Roc syntax to use this platform:

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

Breaking changes

  • Rename all functions to snake_case #288
  • Upgrade to purity inference #257
  • Add new custom type Arg, update API to main! : List Arg => Result {} [Exit I32 Str]_ #293

New functions

Notable Internal changes

Full Changelog: 0.17.0...0.18.0

Migration guide

  • ! is now part of the function name of effectful functions (= all platform functions), it is no longer syntax sugar for Task.await. Change:

    • app [main] { to app [main!] {
    • main = to main! = \_args ->
  • All basic-cli functions have changed to snake_case naming.

  • Task is no longer needed, you can switch to using Result, => is used in the type of a function if it is effectful. Change:

    • Task.ok to Ok
    • Task.err to Err
    • Task to Result
    • Task.loop to a recursive function
    • You may need to add Ok {} as the last line in the main function
    • Example with => :
    rocVersionCheck : Task {} _
    rocVersionCheck =

    To:

    rocVersionCheck! : {} => Result {} _
    rocVersionCheck! = \{} ->
  • We recommend the use of the try keyword:

    • replace Stdout.line! "hello" with try Stdout.line! "hello"
    • use it instead of Task.await
  • HTTP changes:

    • in headers: key to name
    • url to uri
    • mimeType is gone
    • timeout to timeout_ms

Feel free to suggest additions to the migration guide!

Examples of upgrades

0.17.0

22 Nov 09:33
992fb4f
Compare
Choose a tag to compare

⚠️ This release requires a version of Roc released on November 29 2024 or later.

docs

examples

Roc syntax to use this platform:

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

Breaking changes

  • Reordered the arguments of File.write, File.writeBytes, File.writeUtf8, Path.write, Path.writeBytes and Path.writeUtf8. #267
  • Increased buffer size of Stdin.bytes to 16,384 bytes. #268
  • macos-12 testing deprecation #263
  • Roc Str.split and List.split updates #272

Full Changelog: 0.16.0...0.17.0

0.16.0

08 Nov 14:39
b844259
Compare
Choose a tag to compare

docs -> see doc.tar.gz in assets down below

examples

Roc syntax to use this platform:

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

Breaking changes

None

New functions

  • Added support for reading the system or application Locale #258
  • Added Stdin.readtoEnd #259

New Contributors

Full Changelog: 0.15.0...0.16.0

0.15.0

27 Aug 17:37
0.15.0
2a01a72
Compare
Choose a tag to compare

⚠️ This release requires a version of Roc released on August 31 2024 or later.

docs -> see doc.tar.gz in assets down below

examples

Roc syntax to use this platform:

app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" }

Breaking changes

  • Use builtin Task #217

Upgrade Notes

Task is now builtin in Roc, to upgrade to this release you probably just need to remove Task imports like this one:

import pf.Task exposing [Task]

You may also need to change someTime = Utc.now! to someTime = Utc.now! {}

Full Changelog: 0.14.0...0.15.0

0.14.0

23 Aug 12:38
0.14.0
8dea470
Compare
Choose a tag to compare

⚠️ This release requires a version of Roc released between August 23 and August 30 2024.

docs -> see doc.tar.gz in assets down below

examples

Roc syntax to use this platform:

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

What's Changed

  • Make Tcp use a heap like File #237

  • Replace deprecated backpassing, use new ? syntax #244

  • fix docs examples for File.readBytes and File.readUtf8 #238

  • support cargo debug build in build.roc #239

Full Changelog: 0.13.0...0.14.0

0.13.0

27 Jul 13:45
0.13.0
4b9c928
Compare
Choose a tag to compare

⚠️ This release requires a version of Roc released on August 23 2024 or later.

docs -> see doc.tar.gz in assets down below

examples

Roc syntax to use this platform:

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

What's Changed

  • basic-cli now handles building itself using a build.roc file #194
  • Automatic file closing, better file reading #230
  • Update Arg module to new record builder syntax #227

Full Changelog: 0.12.0...0.13.0

0.12.0

09 Jul 16:39
0.12.0
5c03ba6
Compare
Choose a tag to compare

⚠️ This release requires a version of Roc released on June 10 2024 or later.

docs -> see doc.tar.gz in assets down below

examples

Roc syntax to use this platform:

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

What's Changed

Breaking Changes

Other

  • Upgraded Rust to 1.79 #216

Full Changelog: 0.11.0...0.12.0

0.11.0

07 May 11:47
0.11.0
8532149
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.10.0...0.11.0

0.10.0

28 Apr 10:43
0.10.0
dd70c1f
Compare
Choose a tag to compare

⚠️ This release requires a version of Roc released on April 15 2024 or later.

docs -> see doc.tar.gz in assets down below

examples

Roc syntax to use this platform:

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

What's Changed

Breaking changes

  • Update type of main from Task {} I32 to Task {} [Exit I32 Str]_, see #184 and #188. Where you used Task.err 1 in the past, you would now use something like Task.err (Exit 1 "unable to read file: $(msg)").

  • New error pattern in API #188, for example:

# old
deleteEmpty : Path -> Task {} IOError
# new
deleteEmpty : Path -> Task {} [DirErr Err]

# old
output : Cmd -> Task Output (Output, Error)
# new
output : Cmd -> Task Output [CmdOutputError (Output, Err)]

Other

  • Used Roc's new ! syntax all over #184
  • Added convenience function Task.result #182
  • minor fix in examples/dir.roc #195
  • Remove unused Effect type import in Path.roc #183

Full Changelog: 0.9.1...0.10.0