slate 0.0.33 — slatelang.dev goes live, and a test's hooks share its event loop
The documentation goes live, and a test's hooks stop being three separate programs. Two items,
and the first of them is the reason this release exists at all: https://slatelang.dev is deployed
by this tag.
https://slatelang.dev is live
The site is built from the pages already in this repository. site/content is a symlink to
../docs, so there is exactly one copy of every page: the file GitHub renders in the tree is the
file the site builds, and tests_docs.sysl is the check that both are true. Nothing was copied and
none of the existing prose moved — every page gained title and weight frontmatter, which is what
orders the sidebar, and that is all.
Three sections are new, and every fenced program in them is run by the suite like the rest — 24
runnable blocks and 5 refusals between them:
| section | what it is |
|---|---|
| Getting Started | install, a first program, the test runner, the JavaScript back end |
| A tour for JavaScript and TypeScript people | what differs, and why — the parts that are not JavaScript wearing a different hat |
| Packages | sluice, pg, logger, lath, mortar |
.github/workflows/docs.yml builds on dev and deploys only on stable, so a doc change merges
without going live and the site documents the released language rather than the integration branch.
The wordmark is "slate" in Fraunces Italic converted to outlines, one path per glyph, and
site/grammars/slate.tmLanguage.json is slate's own highlighting — the keywords the lexer actually
has, s"..." with its holes, elements, slate: module names and _.
A test's hooks and its body share one event-loop scope
A @setup, the test it prepares and its @teardown are one scope on the interpreter now, and
the reference page says so where it said nothing before. slate test drained the loop after every phase, so the
three were three separate programs and a hook could not do either of the two things a hook is for:
@setup
open_a_listener() =
server = listen(0, conn -> close(conn))
@teardown
give_back_what_the_test_took() =
if armed != null then clearTimeout(armed)
close(server)
A listener opened in a setup hung the run forever — the setup's own drain waited for a handle that
never closes on its own. And a timer armed in the body was waited out before the teardown that
was going to clear it, so setTimeout(never, 3000) failed the test three seconds later on what the
timer did.
Each phase is now run only as far as its own answer settling, and the loop is drained once, after the
teardown, down to what was outstanding when the setup began. @setupAll/@teardownAll bracket the
file the same way, and their floor is what keeps a store opened once for a whole file out of every
test's drain.
slate js had all of this right already — node's loop is one scope and $suite awaits each
phase — so this was the interpreter alone, and the divergence was invisible to any single-host run.
Installing
brew update
brew upgrade slate
The formula names the same nine Homebrew libraries 0.0.32 did — nothing was added to or dropped from
the link line.
The compiler floor is sysl 0.0.105.