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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec diverges from Solid, the divergence is recorded as a `DV-n` in

## Running the suite

Solid is built from its `next` branch at the pinned commit (needs pnpm and a
Solid is built from its `main` branch at the pinned commit (needs pnpm and a
Rust toolchain):

```sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ node --experimental-strip-types ref/check.ts examples/todo.rx # check a progra
node --experimental-strip-types ref/run.ts # run every scenario
```

Running the scenarios on Solid itself needs Solid's `next` branch built from
Running the scenarios on Solid itself needs Solid's `main` branch built from
source (pnpm and a Rust toolchain); see [CONTRIBUTING.md](CONTRIBUTING.md) and
[`ref/README.md`](ref/README.md). The compiler builds with Cargo
([`compiler/README.md`](compiler/README.md)). To try an unreleased editor build, install a `.vsix` from a run of the
Expand Down
5 changes: 3 additions & 2 deletions ref/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Why TypeScript and not OCaml: it runs in the playground later, and it can
import `@solidjs/signals` to diff the interpreter against the real runtime on
the same scenario.

Solid comes from its `next` branch, built from source at the commit in
Solid comes from its `main` branch, built from source at the commit in
`ref/SOLID_NEXT`: `sh ref/scripts/solid-next.sh` checks it out beside this
repository (`../solid-next`), builds `@solidjs/signals`, `solid-js`,
`@solidjs/web`, `@solidjs/universal` and the native `@solidjs/compiler`
(pnpm and a Rust toolchain), and `ref/package.json` links them
(`--latest` moves the pin to `next`'s HEAD). Views are JSX that
(`--latest` moves the pin to `main`'s HEAD, or to another branch's with
`SOLID_BRANCH=<branch>`). Views are JSX that
`@solidjs/compiler` lowers (`compile/jsx.ts`): `universal` over a string-tree
renderer for the compiled runner, `ssr` and `dom` (hydratable) for the server
runner.
Expand Down
21 changes: 14 additions & 7 deletions ref/scripts/solid-next.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#!/bin/sh
# ref/ runs on Solid 2.0's `next` branch built from source — the branch the async rules come from — at the commit
# pinned in ref/SOLID_NEXT. The checkout lives beside this repository (../solid-next), or at $SOLID_NEXT.
# ref/ runs on Solid 2.0 built from source, at the commit pinned in ref/SOLID_NEXT. The checkout lives beside this
# repository (../solid-next), or at $SOLID_NEXT.
# sh ref/scripts/solid-next.sh check out the pinned commit and build what ref/ links
# sh ref/scripts/solid-next.sh --latest move the pin to next's HEAD first
# sh ref/scripts/solid-next.sh --latest move the pin to main's HEAD first
# The pin is fetched by its hash, so it builds whichever branch it is on. $SOLID_BRANCH (default main) is the branch a
# new checkout starts on and --latest follows: `SOLID_BRANCH=<branch> sh ref/scripts/solid-next.sh --latest`.
set -e
HERE=$(cd "$(dirname "$0")/.." && pwd)
DIR=${SOLID_NEXT:-$HERE/../../solid-next}
[ -d "$DIR/.git" ] || git clone --branch next https://github.com/solidjs/solid "$DIR"
git -C "$DIR" fetch -q origin next
if [ "$1" = "--latest" ]; then git -C "$DIR" rev-parse origin/next > "$HERE/SOLID_NEXT"; fi
git -C "$DIR" checkout -q "$(cat "$HERE/SOLID_NEXT")"
BRANCH=${SOLID_BRANCH:-main}
[ -d "$DIR/.git" ] || git clone --branch "$BRANCH" https://github.com/solidjs/solid "$DIR"
if [ "$1" = "--latest" ]; then
git -C "$DIR" fetch -q origin "$BRANCH"
git -C "$DIR" rev-parse FETCH_HEAD > "$HERE/SOLID_NEXT"
fi
PIN=$(cat "$HERE/SOLID_NEXT")
git -C "$DIR" cat-file -e "$PIN^{commit}" 2>/dev/null || git -C "$DIR" fetch -q origin "$PIN"
git -C "$DIR" checkout -q "$PIN"
cd "$DIR"
pnpm install --frozen-lockfile
for p in signals solid web universal; do (cd "packages/$p" && pnpm run build && pnpm run --if-present types); done # types: the JSX types the types runner checks against
Expand Down