Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e
- name: Install Rust toolchain
run: |
rustup toolchain install "${{ needs.rust-version.outputs.version }}" --profile minimal --target x86_64-unknown-linux-musl --component llvm-tools-preview
Expand All @@ -57,6 +58,7 @@ jobs:
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e
- name: Install Rust toolchain
shell: bash
run: |
Expand Down Expand Up @@ -101,6 +103,7 @@ jobs:
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e
- name: Install Rust toolchain
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e

- name: Restore released docs
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e

- name: Install Zig
uses: mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f
Expand Down Expand Up @@ -214,6 +215,7 @@ jobs:
uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e

- name: Install Rust
shell: bash
Expand Down Expand Up @@ -258,6 +260,7 @@ jobs:
uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e

- name: Create docs staging tree
run: mkdir -p docs-site
Expand Down Expand Up @@ -405,6 +408,7 @@ jobs:
uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-08-13-2fdd90e

- name: Download release metadata
uses: actions/download-artifact@v8
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Thanks for helping improve `basic-cli`.

CI uses the current Roc nightly from [`roc-lang/nightlies`](https://github.com/roc-lang/nightlies).
CI uses a pinned Roc nightly from [`roc-lang/nightlies`](https://github.com/roc-lang/nightlies).
For local work, use any recent `roc` on `PATH`, or download the latest archive
for your operating system from the
[`roc-lang/nightlies` releases](https://github.com/roc-lang/nightlies/releases/latest).
Expand All @@ -24,8 +24,8 @@ the directory containing the `roc` executable to your `PATH`.

## Updating Roc Glue

CI intentionally tracks the current nightly, so compiler updates are adopted as
soon as a new nightly is published. If a nightly changes the host ABI:
CI pins a specific nightly so the compiler and committed host ABI glue cannot
drift independently. When updating the nightly pin in the workflows:

1. Run `./ci/regenerate_glue.sh` to refresh `src/roc_platform_abi.rs`.
2. Reconcile `src/lib.rs` if generated names or layouts changed.
Expand Down
10 changes: 10 additions & 0 deletions examples/sqlite-everything.roc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ run! = || {
print_line!(" id: ${I64.to_str(t.id)}, task: ${t.task}, status: ${status_to_str(t.status)}, edited: ${edited_to_str(decode_edited(t.edited_val))}")?
}

# Keep a runtime-allocated string live after binding it. This guards against
# the host recursively releasing fields that remain owned by the Roc caller.
heap_binding = Str.repeat("x", 40)
Sqlite.execute!({
path: db_path,
query: "UPDATE todos SET task = task WHERE task = :never;",
bindings: [{ name: ":never", value: String(heap_binding) }],
}) ? |err| HeapStringBindingFailed(err)
expect heap_binding == "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Example: filter rows by status (decode a single column)
tasks_in_progress = Sqlite.query_many!({
path: db_path,
Expand Down
Loading
Loading