Repository navigation
Changed
-
The kinds are
0.1. A Lua app is shown atlua0.1,pencere.versionis the string
"0.1", and a terminal that opensluaat another version is told so on standard error before
the app's fallback runs:pencere: this program is written for lua 0.1; this terminal opens lua 0.2; update the older of the two. While the specification is a draft the versions ofluaand
webare0.x: a change an existing view can notice moves the minor number (0.2after0.1),
an addition does not, and a host opens one version. A program whose version the host does not open
is not opened, and says so in a sentence that names both sides. -
pencere testcounts places as a script does:page:select,page:caret_toand the
anchorandheadofpage:editor(name).selectionsare bytes of the text from 1, as
layout.editor_textand an editor's events say them. -
A page that fails is shown again, and the app goes on.
pencere.serveshows a
page that made an error, trapped or went over a limit once more from the start, silently, once in
a minute (the page asks the app for where it was);ended = "error"now means that was given up
on, because the failure came twice inside the minute or the terminal did not bring the view back. -
A Lua app is shown at
lua0.1alone. The kit has one version of the page API while the
specification is a draft. A terminal that opens another finds no version in common.
Added
- What a page prints is in the app's log. A page's
printandwarnare written where the
app's ownprintgoes (the terminal,--log FILE,.pencere/logunderpencere dev), behind
view:(andview: warning:forwarn) so that the two are told apart. A failure of
pencere testshows them with what the program printed. A control character in a line is written
as\xNN. pencere.serverefuses acallsortopicsname that begins withpencere.: the names are the
protocol's.pencere.files.receivetakes thepathand thesizethe page was handed with a file, in its
options: where the page passes them on, the file is copied from there rather than read through
the terminal, which on the person's machine is as fast as the disk. Thefiles-luaexample's page
passes them on.
Fixed
-
pencere upgradeworks in a folder only the person can enter. It downloaded the release and
its sums intopencere-upgrade-<pid>in the temporary directory, made if it was not there, so that
a folder (or a link) another user had put there beforehand was written to and read back from. The
folder is now made bymkdtemp: a name made up by the system, never one that can be made beforehand,
new, with the mode0700; the temporary directory itself is made first whenTMPDIRnames a folder
that is not there. -
pencere devon a Cargo package leaves what its tools keep alone. It read every file of the
project four times a second, and a directory it did not know by name, such as a.cacheholding a
checkout and its build, was read with the rest: a quarter of a core for as long as the pane was
open. What is hidden, andtargetandnode_modulesat any depth, are now left out, so a save
there no longer builds and runs the program again either. -
pencere devis left with ⌃C, as it says, and ends with 0: while the program runs, while Cargo
builds it and while a change is waited for. It ended with the program's 130, or was killed by the
signal while it waited, somake devreported an error on every leaving. -
The calls and the subscriptions of a view start in the order the view made them. Each came in on a
thread of its own and raced the others to the app's loop, so that two edits the view sent one
after the other could be begun the other way round; they are now handed to the loop as the view
sends them (the program library's deferred handlers), and none waits for another's answer. -
page:wait_forinpencere testgoes on waiting when the page's view is over (the program closed
it, showed another, lent the terminal), as what it waits for may be what the program does next:
a program goes on after itsserveon its own time, and the wait raised the view's end before
the program had written what the test looked for. If the condition never comes the failure says
the view is over.
Changed
- The runner shows the views of the kit's page API at
lua0.1. pencere.handoffis thepencerelibrary's hand-off: the sameserveshows the view again
instead of a new one being started, the app's loop is no longer the one that waits for the view
to give the terminal back, and a hangup while the program has the terminal is passed on to it
and endsserveonce it has ended. A change to the view's files underpencere devwhile the
program has the terminal is the view that comes back.
Added
-
Files with the view (
pencere.files, a terminal that openslua0.1):attachand
attach_datagive the view a file to draw and return its name,detachlets it go,receive
takes a file the person gave the page by its handle (through a.pencere-partthat is deleted when
it is not finished),sendwrites a file to the place the person chose in the Save panel, and
safe_namemakes the person's name one a path can take. Each waits without holding the loop; a
failure is{ code =, message = }. Apps offerlua0.1.pencere testplays the
person's files:give_files,drag_files_over,drag_files_away,panel,choose_files,
choose_place, andtest.open{ attach = { bytes } }. The examplefiles-luashows them. -
pencere testsays how the host draws its terminal's cursor and selection (terminal_look,draws
oftest.open;page:set_terminal_look(table)changes it, and the page is told). -
pencere testcandwell(id, x, y)(the pointer rests over a word of an editor that hears of it,
as long as it takes to be told),hold("cmd"),release()andclick_holding(x, y, "cmd")(the modifiers a person holds) and say where a range the page named is (anchor_rect(editor, name)). -
PENCERE_CALL_MSforpencere test. The time, in milliseconds, a call of the page may take
in a test: the floor's 250 ms (the least a host gives a page) unless it is set. The limit is the wall
clock's, and a test of what a page shows and does should not fail for how quick a busy runner is;
a value that is not a whole number above zero is not read. -
pencere test. Runs the tests of an app, written in Lua (test/**/*_test.lua,
require("pencere.test")), against the page of the app under a host with no screen: its page
engine, editors and interpreter, with a clock the test moves. The page's program is a stand-in
made of calls the test answers, the app's own program (Lua, in the test's process, in an
environment of its own; a Cargo package, built once and run on a pty) or any program on a pty.
Things are found by their words and their role, the test looks withexpect, and a failure says
what the page showed and keeps its picture, its words and its messages. The files run on worker
processes (--jobs), a test is cut off at its timeout, and the report is pretty, TAP or JUnit.
The runner of tests,pencere-test, is a program of its own and a second file of the release:
the command runs the one beside it, or the release's of the same version (checked against its
SHA256SUMS, kept in the cache), or the onePENCERE_TESTnames.pencere newmakes the first
test (Lua and Rust projects; TypeScript with--page lua), and a simple-form app does not pack
test/(a program module of that form cannot live in a directory of that name). -
pencere new --lang ts --page lua. A TypeScript project whose view is a page of the kit,
the Lua project's page, with its first test. -
pencere upgrade. Replaces the command with the newest release of it, asinstall.shwould
install it: the release's file for this machine, checked against the release'sSHA256SUMS, put
in the place of the running file in one rename.--checkonly says whether there is a newer one,
--version X.Y.Ztakes that one (an older one too). A command Cargo installed is left to Cargo,
with the line that replaces it. -
pencere devandpencere buildfor a program in Rust. In a Cargo package,pencere dev
builds the program with Cargo and runs it in the pane: a change to the page or a picture shows
the view again without ending it (thepencerelibrary reads them from the project), and a
change to anything else builds and runs it again; the program's standard error goes to the log.
pencere buildbuilds it withcargo build --release(--targetpassed on, with what to install
when the toolchain lacks it) and copies it todist/<name>. -
pencere new --lang rustmakes a project whose build script carriessrc/view/and
src/assets/into the program (pencere::app!()), so the page can be split into files as a Lua
app's is. It needs thepencerecrate that hasApp: the release that ships this command sets
the version of the crate in the template to it.