The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
A stored plug-in that didn't install, for example because its load
panicked or its module is broken, was only written to the log. The
person could not see it or load it again without restarting.
- plugin.list gains failed: [{file, error, from}], the plug-in files
that didn't load in this process: those of the Plug-ins folder, and
those the folder report of the Additional Plug-ins Folder (or the
folder plugin.reload loaded last) lists as failed. Disabled plug-ins,
files turned off since they failed, and modules skipped because
another install or removal of their id came first are left out. A
file that both loads list is listed once, as a stored file. A
plugin.reload replaces only the folder's rows. Installing or removing
a plug-in whose module is in a stored file that failed, or a later
load that installs it, takes the file off the list.
- plugin.retry {file?} loads one of those files again, or all of them,
with the same checks as the load it failed in, and reports for each
whether this retry installed it. A folder file's row in the folder
report moves to loaded or keeps its new error. Under automation read
roots, a file outside them is not read again, its row stays listed,
and the reply names it and its folder by their names. Safe Mode
returns an error.
- plugin.setEnabled {file} also takes the name failed gives a file
outside the read roots.
- Object › Plug-ins › Plug-ins That Didn't Load… lists the files with
why; Retry All loads them again under the read roots the list opened
under, and the status bar says how many loaded. The item is disabled
while nothing failed.
- A command.batch that runs a filter and then retries a module with
its id turns Apply Last Filter off, as a reinstall does.
Docs: docs/plugins.md (Plug-ins that didn't load), docs/mcp.md.
The example filter parsed its input with serde_json's default float
parser and handed every object back with its `path`. A coordinate could
come back changed in its last digit, which the host reads as a new path:
a live shape became a plain path after a color-only run, and a compound
path with a hidden, locked or guide member was refused.
The filter now leaves `path` out of each object it returns, so each
object keeps its geometry, as docs/plugins.md advises for a filter that
does not change it. The fixture desaturate.wasm is rebuilt from the
source with build.sh.
Docs: docs/plugins.md.
docs/plugins.md said a piece's opacity, when left out, is the object's.
The piece takes no opacity of its own in that case: the object's opacity
applies once to all the pieces together, so the line now says 100%.
The export test also opens the exported PDF and draws it: the piece is
half green and grown by Offset Path, as on the canvas, so a PDF that
drops the opacity or writes the original path fails the test.
Hosts from before api 3 refuse the manifest. A host at api 3 without writes
installs the filter, ignores the key and refuses an output that changes the
objects it was given.
plugin.remove now deletes an installed plug-in's stored module along with
its grant, before its settings and cache are deleted. When the module file
can't be deleted, the command returns "can't delete <file>", the settings
and cache are moved back, the plug-in stays installed, and the grant the
signed grants file held for it is written back, so the stored module
still loads at the next launch. Before, the command returned {removed}
and left the module in the plug-in folder.
The Safe Mode choice after a stopped launch moves to main's dialog host and keeps listing every
plug-in that was loading: one name in the sentence, or the list with "Disable Listed Plug-ins and
Continue". Automation requests wait in the queue while plug-ins load, and one past its deadline is
answered as expired. File > Open and opening a file still wait for the plug-ins still loading.
- A stored module's file is read again on its worker thread once the module
has loaded, whatever the file's modified time, and the install still skips
a file whose stamp changed since. The UI thread no longer reads the file.
- Stored and folder modules install through registry::install_for_load,
which checks for an install or removal of the id elsewhere while the
plug-ins' write lock is held, and records the module's grant in the same
step. A grant is forgotten only while the plug-in that took that revision
is still installed (registry::revoke_if_installed).
- A grant that a stored load removed and must put back for a later file is
written to grants.json first; when that write fails, the module is not
installed, and a grant put back for a module that then did not install is
removed again.
- A folder load in which a file found no loader thread is loaded again the
next time the preferences are applied. A plugin.reload keeps its report as
the folder last loaded only when no load started after it.
- Loads: a job's time is read while it is marked finished, the deadline check
reads the clock under the same lock, and only the jobs taken from the queue
fail when no worker is left. wait() counts outcomes taken with ready() as
released, so the jobs after them start.
- File › Open checks the path again after waiting for the plug-in loads.
- Tests wait for workers with bounded receives.
docs/plugins.md now says that each new member keeps only the id of the
old member in its place, with its name, live shape, opacity, blending
mode, appearance, opacity mask and other settings of its own reset, and
that `guide: false` on a compound path makes each guide member an
ordinary path.
The compound path test also checks that `type: "path"` without `guide`
is refused for a compound path with a guide member and leaves the member
a guide, and its doc comment names members that are not paths.
A member that is not a path (a compound path inside a compound path) is
not in the input's `path`, so a changed `path` or `type: "path"` deleted
it, together with any hidden or locked members it held. The host now
refuses such an output with an error naming the compound path. A
compound handed back as it was still keeps the member.
docs/plugins.md also says that new members keep the old ids by position
but not their names or live shapes. The test covers a nested compound
member and turning a compound with a guide member into a guide path.
A filter that handed a compound path back rebuilt every member from the
returned path, even when the path was unchanged, so its hidden members
were shown and its locked members unlocked after any run.
- A compound path whose path comes back as it was, or is left out, keeps
its members as they are.
- While a member is hidden, locked or a guide, a changed path or
`type: "path"` is refused with an error naming the compound path. A
guide member is allowed when the output also sets `guide`.
- A changed path still replaces the members, one per subpath, keeping
the old members' ids by position.
Docs: docs/plugins.md.
A Curves effect a painted live-effect plug-in returns is refused when its
`points` string holds a token that is not an `x,y` pair of numbers, or
when any point in the string or the `[[x, y], …]` array lies outside 0
to 255. Before, an unreadable string passed and the effect drew the
default curve, and an out-of-range point was clamped.
A color object's RGB, CMYK and Gray components are each from 0 to 1. A
Lab color's `l` is from 0 to 100, and its `a` and `b` are any finite
numbers, as the returned-effect check accepts them.
A returned Curves effect's `points` is now also taken as [[x, y], ...],
the form the effect draws, each entry a pair of numbers. A returned
Transform effect's `copies` and `reference` must be whole numbers; 1.5
copies drew one copy before.
A returned effect's `color` given as [r, g, b] now needs each of the
first three components from 0 to 1, and a color object needs its
components from 0 to 1 (a Lab color's lightness from 0 to 100), as the
effects document them. [2, -1, 0] was taken before.