Skip to content

Commit

Permalink
Move ./src/ to ./platform/
Browse files Browse the repository at this point in the history
I think it is a clearer name. It also avoids the confusing `./src/src`.
  • Loading branch information
bhansconnect committed Dec 22, 2023
1 parent d11fda1 commit a7c5623
Show file tree
Hide file tree
Showing 61 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We are committed to providing a friendly, safe and welcoming environment for all
You can generate the documentation locally and then start a web server to host your files.

```bash
roc docs src/main.roc
roc docs platform/main.roc
cd generated-docs
simple-http-server --nocache --index # comes pre-installed if you use `nix develop`, otherwise use `cargo install simple-http-server`.
```
Expand Down
2 changes: 1 addition & 1 deletion ci/all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ done
$ROC build ./ci/file-testBROKEN.roc $ROC_BUILD_FLAGS

# test building website
$ROC docs src/main.roc
$ROC docs platform/main.roc
2 changes: 1 addition & 1 deletion ci/file-testBROKEN.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "file-test"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Task.{ Task },
Expand Down
2 changes: 1 addition & 1 deletion ci/test_latest_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CLI_RELEASES_JSON=$(curl -s https://api.github.com/repos/roc-lang/basic-cli/rele
CLI_RELEASE_URL=$(echo $CLI_RELEASES_JSON | jq -r '.[0].assets | .[] | select(.name | test("\\.tar\\.br$")) | .browser_download_url')

# Use the latest basic-cli release as the platform for every example
sed -i "s|../src/main.roc|$CLI_RELEASE_URL|g" $EXAMPLES_DIR/*.roc
sed -i "s|../platform/main.roc|$CLI_RELEASE_URL|g" $EXAMPLES_DIR/*.roc

# Install required packages for tests if they're not already available
command -v ncat &>/dev/null || sudo apt install -y ncat
Expand Down
18 changes: 11 additions & 7 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
args
command
countdown
dir
echo
form
http-get
env
example-stdin
file-mixed
file-mixedBROKEN
file-read
env
form
hello-world
http-get
out.txt
piping
record-builder
stdin
tcp-client
time
record-builder
command
example-stdin
dir
2 changes: 1 addition & 1 deletion examples/argsBROKEN.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "args"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Stdout, pf.Arg, pf.Task.{ Task }]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/command.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "command"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Cmd,
Expand Down
2 changes: 1 addition & 1 deletion examples/countdown.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "countdown"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Stdin, pf.Stdout, pf.Task.{ await, loop }]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/dir.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "dir"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Stderr,
Expand Down
2 changes: 1 addition & 1 deletion examples/echo.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "echo"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Stdin, pf.Stdout, pf.Task.{ Task }]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/env.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "env"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Stdout, pf.Stderr, pf.Env, pf.Task.{ Task }]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/file-mixedBROKEN.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "file-mixed"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Stderr,
Expand Down
2 changes: 1 addition & 1 deletion examples/file-read.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "file-read"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Stderr,
Expand Down
2 changes: 1 addition & 1 deletion examples/form.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "form"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Stdin, pf.Stdout, pf.Task.{ await, Task }]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "hello-world"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Stdout, pf.Task.{ Task }]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/http-get.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "http-get"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Http, pf.Task.{ Task }, pf.Stdin, pf.Stdout]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/piping.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "piping"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Stdin,
Expand Down
2 changes: 1 addition & 1 deletion examples/record-builder.roc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "record-builder"
packages {
pf: "../src/main.roc",
pf: "../platform/main.roc",
}
imports [
pf.Stdout,
Expand Down
2 changes: 1 addition & 1 deletion examples/stdin.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "stdin"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Stderr,
Expand Down
2 changes: 1 addition & 1 deletion examples/tcp-client.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "tcp-client"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [pf.Tcp, pf.Task.{ Task, await }, pf.Stdout, pf.Stdin, pf.Stderr]
provides [main] to pf

Expand Down
2 changes: 1 addition & 1 deletion examples/time.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app "time"
packages { pf: "../src/main.roc" }
packages { pf: "../platform/main.roc" }
imports [
pf.Stdout,
pf.Task,
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# get current working directory
cwd = builtins.toString ./.;
rust =
pkgs.rust-bin.fromRustupToolchainFile "${cwd}/src/rust-toolchain.toml";
pkgs.rust-bin.fromRustupToolchainFile "${cwd}/platform/rust-toolchain.toml";

linuxInputs = with pkgs;
lib.optionals stdenv.isLinux [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a7c5623

Please sign in to comment.