Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into remove-nat
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfeldman committed Feb 11, 2024
2 parents 50ea255 + ec93892 commit 24a38c4
Show file tree
Hide file tree
Showing 99 changed files with 2,644 additions and 946 deletions.
2 changes: 1 addition & 1 deletion BUILDING_FROM_SOURCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ On MacOS and Linux, we highly recommend Using [nix](https://nixos.org/download.h

### On Linux x86_64 or MacOS aarch64/arm64/x86_64

#### Install
#### Installing Nix

If you are running ArchLinux or a derivative like Manjaro, you'll need to run `sudo sysctl -w kernel.unprivileged_userns_clone=1` before installing nix.

Expand Down
119 changes: 118 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ install-zig-llvm:
RUN apt -y install libpolly-16-dev # required by llvm-sys crate
ENV RUSTFLAGS="-C link-arg=-fuse-ld=lld -C target-cpu=native"
RUN apt -y install libssl-dev
RUN OPENSSL_NO_VENDOR=1 cargo install wasm-pack
RUN wget https://rustwasm.github.io/wasm-pack/installer/init.sh -O init.sh && sh init.sh
# sccache
RUN cargo install sccache --locked
RUN sccache -V
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ If you would like your company to become a corporate sponsor of Roc's developmen

We'd also like to express our gratitude to our generous [individual sponsors](https://github.com/sponsors/roc-lang/)! A special thanks to those sponsoring $25/month or more:

* [Steven Chen](https://github.com/megakilo)
* [Drew Lazzeri](https://github.com/asteroidb612)
* [Alex Binaei](https://github.com/mrmizz)
* [Jono Mallanyk](https://github.com/jonomallanyk)
Expand Down
54 changes: 41 additions & 13 deletions crates/cli/tests/cli_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,22 +553,24 @@ mod cli_run {
&[],
indoc!(
r#"
── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─
This expectation failed:
19│ expect words == []
28│ expect words == []
^^^^^^^^^^^
When it failed, these variables had these values:
words : List Str
words = ["this", "will", "for", "sure", "be", "a", "large", "string", "so", "when", "we", "split", "it", "it", "will", "use", "seamless", "slices", "which", "affect", "printing"]
[<ignored for tests>:22] x = 42
[<ignored for tests>:23] "Fjoer en ferdjer frieten oan dyn geve lea" = "Fjoer en ferdjer frieten oan dyn geve lea"
[<ignored for tests>:24] "this is line 24" = "this is line 24"
[<ignored for tests>:13] x = "abc"
[<ignored for tests>:13] x = 10
[<ignored for tests>:13] x = (A (B C))
[<ignored for tests>:31] x = 42
[<ignored for tests>:33] "Fjoer en ferdjer frieten oan dyn geve lea" = "Fjoer en ferdjer frieten oan dyn geve lea"
[<ignored for tests>:35] "this is line 24" = "this is line 24"
[<ignored for tests>:21] x = "abc"
[<ignored for tests>:21] x = 10
[<ignored for tests>:21] x = (A (B C))
Program finished!
"#
),
Expand All @@ -584,20 +586,46 @@ mod cli_run {
&[],
indoc!(
r#"
── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─
This expectation failed:
6│> expect
7│> a = 1
8│> b = 2
9│>
10│> a == b
9│ expect a == 2
^^^^^^
When it failed, these variables had these values:
a : Num *
a = 1
b : Num *
── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─
This expectation failed:
10│ expect a == 3
^^^^^^
When it failed, these variables had these values:
a : Num *
a = 1
── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─
This expectation failed:
14│> expect
15│> a = makeA
16│> b = 2i64
17│>
18│> a == b
When it failed, these variables had these values:
a : Int Signed64
a = 1
b : I64
b = 2
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/fixtures/packages/app.roc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ app "packages-test"
imports [json.JsonParser, csv.Csv]
provides [main] to pf

main = "Hello, World! \(JsonParser.example) \(Csv.example)"
main = "Hello, World! $(JsonParser.example) $(Csv.example)"
2 changes: 1 addition & 1 deletion crates/cli_testing_examples/benchmarks/Quicksort.roc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ show = \list ->
|> List.map Num.toStr
|> Str.joinWith ", "

"[\(content)]"
"[$(content)]"

sortBy : List a, (a -> Num *) -> List a
sortBy = \list, toComparable ->
Expand Down
4 changes: 2 additions & 2 deletions crates/cli_testing_examples/benchmarks/rBTreeInsert.roc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ showRBTree = \tree, showKey, showValue ->
sL = nodeInParens left showKey showValue
sR = nodeInParens right showKey showValue

"Node \(sColor) \(sKey) \(sValue) \(sL) \(sR)"
"Node $(sColor) $(sKey) $(sValue) $(sL) $(sR)"

nodeInParens : RedBlackTree k v, (k -> Str), (v -> Str) -> Str
nodeInParens = \tree, showKey, showValue ->
Expand All @@ -37,7 +37,7 @@ nodeInParens = \tree, showKey, showValue ->
Node _ _ _ _ _ ->
inner = showRBTree tree showKey showValue

"(\(inner))"
"($(inner))"

showColor : NodeColor -> Str
showColor = \color ->
Expand Down
2 changes: 1 addition & 1 deletion crates/cli_testing_examples/benchmarks/testAStar.roc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ main =
#
# _ ->
# ns = Num.toStr n
# Task.putLine "No test \(ns)"
# Task.putLine "No test $(ns)"
showBool : Bool -> Str
showBool = \b ->
if
Expand Down
Loading

0 comments on commit 24a38c4

Please sign in to comment.