Skip to content

Commit 005fe9e

Browse files
authored
Update package and fix warnings. (#76)
1 parent fd659d9 commit 005fe9e

File tree

14 files changed

+32
-32
lines changed

14 files changed

+32
-32
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
os: [ ubuntu-latest, windows-latest, macos-latest ]
1313
# The versions should contain (at least) the lowest requirement
1414
# and a version that is more up to date.
15-
toit-version: [ v2.0.0-alpha.161, latest ]
15+
toit-version: [ v2.0.0-alpha.170, latest ]
1616
include:
17-
- toit-version: v2.0.0-alpha.161
17+
- toit-version: v2.0.0-alpha.170
1818
version-name: old
1919
- toit-version: latest
2020
version-name: new

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ store-from-file cli/Cli:
176176
store.with-tmp-directory: | tmp-dir |
177177
data-path := "$tmp-dir/data.txt"
178178
// Create a file with some data.
179-
file.write-content --path=data-path "Hello world"
179+
file.write-contents --path=data-path "Hello world"
180180
store.move data-path
181181
182182
print data // Prints the binary representation of "Hello world".
@@ -201,8 +201,8 @@ store-directory cli/Cli:
201201
print "Directory is not cached. Computing it."
202202
store.with-tmp-directory: | tmp-dir |
203203
// Create a few files with some data.
204-
file.write-content --path="$tmp-dir/data1.txt" "Hello world"
205-
file.write-content --path="$tmp-dir/data2.txt" "Bonjour monde"
204+
file.write-contents --path="$tmp-dir/data1.txt" "Hello world"
205+
file.write-contents --path="$tmp-dir/data2.txt" "Bonjour monde"
206206
store.move tmp-dir
207207
208208
print directory // Prints the path to the directory.

examples/cache.toit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ store-directory cli/Cli:
2525
print "Directory is not cached. Computing it."
2626
store.with-tmp-directory: | tmp-dir |
2727
// Create a few files with some data.
28-
file.write-content --path="$tmp-dir/data1.txt" "Hello world"
29-
file.write-content --path="$tmp-dir/data2.txt" "Bonjour monde"
28+
file.write-contents --path="$tmp-dir/data1.txt" "Hello world"
29+
file.write-contents --path="$tmp-dir/data2.txt" "Bonjour monde"
3030
store.move tmp-dir
3131

3232
print directory // Prints the path to the directory.

examples/commands.toit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fleet-status invocation/Invocation:
106106
cli := invocation.cli
107107
verbose := cli.ui.level >= Ui.VERBOSE-LEVEL
108108

109-
cli.ui.emit
109+
cli.ui.emit --kind=Ui.RESULT
110110
--structured=: {
111111
"some": "json",
112112
"info": "about the status",
@@ -210,5 +210,5 @@ reset-device invocation/Invocation:
210210
force := invocation["force"]
211211

212212
with-device invocation: | device |
213-
cli.ui.inform "Resetting device '$device' in $(mode)-mode."
214-
if force: cli.ui.debug "Using the force if necessary."
213+
cli.ui.emit --info "Resetting device '$device' in $(mode)-mode."
214+
if force: cli.ui.emit --debug "Using the force if necessary."

examples/package.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sdk: ^2.0.0-alpha.144
1+
sdk: ^2.0.0-alpha.170
22
prefixes:
33
cli: ..
44
host: pkg-host
@@ -26,5 +26,5 @@ packages:
2626
pkg-host:
2727
url: github.com/toitlang/pkg-host
2828
name: host
29-
version: 1.15.3
30-
hash: 62393e8522b77eafbafe60b9817935266117daf6
29+
version: 1.16.2
30+
hash: ae83f761db80166a20bb38498edd009916b72563

examples/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ dependencies:
33
path: ..
44
host:
55
url: github.com/toitlang/pkg-host
6-
version: ^1.15.3
6+
version: ^1.16.2

package.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sdk: ^2.0.0-alpha.161
1+
sdk: ^2.0.0-alpha.170
22
prefixes:
33
desktop: pkg-desktop
44
fs: pkg-fs
@@ -21,5 +21,5 @@ packages:
2121
pkg-host:
2222
url: github.com/toitlang/pkg-host
2323
name: host
24-
version: 1.15.3
25-
hash: 62393e8522b77eafbafe60b9817935266117daf6
24+
version: 1.16.2
25+
hash: ae83f761db80166a20bb38498edd009916b72563

package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: cli
22
description: Tools, like an argument parser, to create command-line applications.
33
environment:
4-
sdk: ^2.0.0-alpha.161
4+
sdk: ^2.0.0-alpha.170
55
dependencies:
66
desktop:
77
url: github.com/toitlang/pkg-desktop
@@ -11,4 +11,4 @@ dependencies:
1111
version: ^2.3.1
1212
host:
1313
url: github.com/toitlang/pkg-host
14-
version: ^1.15.3
14+
version: ^1.16.2

src/cache.toit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class Cache:
111111
*/
112112
get key/string [block] -> ByteArray:
113113
key-path := get-file-path key block
114-
return file.read-content key-path
114+
return file.read-contents key-path
115115

116116
/**
117117
Returns the path to the cached directory item with the given $key.
@@ -326,7 +326,7 @@ class FileStore_ implements FileStore:
326326
*/
327327
save bytes/ByteArray:
328328
store_: | file-path/string |
329-
file.write-content bytes --path=file-path
329+
file.write-contents bytes --path=file-path
330330

331331
/**
332332
Calls the given $block with a $io.Writer.

src/config.toit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Config:
9090

9191
data := null
9292
exception := catch:
93-
content := file.read-content path
93+
content := file.read-contents path
9494
data = json.decode content
9595
if exception: throw "Invalid configuration file '$path': $exception."
9696
if data is not Map: throw "Invalid JSON in configuration file '$path'."

0 commit comments

Comments
 (0)