CI's test-lint step failed on with_e4x_async_before_a_double_colon_is_a_qualified_name:
both of its assertions only checked is_ok. The test now runs x.async::b with async
bound to a Namespace and asserts that it selects the namespaced child.
- AsyncFunction.prototype has Symbol.toStringTag "AsyncFunction",
configurable only.
- await checks the room for the awaited promise's reaction or job and
the suspended frame's bytes before it attaches the reaction, so a
suspension stays within the heap limit.
- An async function's return pops its frame before resolving its
promise, so a then getter on the returned value runs without it.
Returning the function's own promise rejects it at the return.
- Block functions whose variable was not declared are kept in a hash
set, so each block function's lookup takes constant time.
- A shorthand await in an object pattern of an async arrow function's
head is a syntax error, and the head accepts patterns with defaults
such as async ({a = 1}) => a. async({a = 1}) without an arrow is
still a syntax error.
- docs: .jsx files and source strings run with module: true have
Promise and the async syntax; await is an identifier only in script
code.
An assignment that ends a block without a semicolon (`{ input = c }`) now
makes its alias at the block's close instead of after the next statement.
A `let` inside a move closure, or one of its parameters, now counts as a
local binding: an assignment to it ends the alias as it does outside a
closure. Assignments to outer captures are still skipped.
A closure stored with `let` in `Some`, `Ok`, `Err`, `Box::new`, `Rc::new`
or `Arc::new` and never used again does not run, so its assignments no
longer end an alias. A closure passed to any other call may run and still
ends it.
An async closure called where it is written now runs when the call is
passed straight to `block_on` (a trailing comma included), unless the
`block_on` sits inside another closure.
Object.defineProperties, Object.create, seal and freeze read an ordinary
object's own names in ECMAScript order (array indices ascending first) in
an ES2015 run, through proxies without an ownKeys trap too; without the
option they keep the order for-in visits.
concat reads Symbol.isConcatSpreadable and with scopes read
Symbol.unscopables only in an ES2015 run, so a Symbol set by an earlier
run does not change code run without the option.
Tests: the host-function proxy refusal checks the throw and that neither
the host function nor the trap ran; the bound-constructor test sets the
custom prototype before constructing.
pathItems.removeAll() throws "cannot delete hidden or locked paths" when
any path is hidden or locked or is inside a hidden or locked object, and
only otherwise "cannot delete objects on a locked artboard". Both
messages end with a colon and up to 20 path ids. docs/mcp.md now says
so in both places that describe removeAll().
all-unguarded, only-weak, exit-status-only, no-assertion, early-return,
env-gate-unset, census, mirror, constant-echo, fixture-only and
exact-pixel only listed their hits before. Their hits on changed lines
and tests now fail the check like the other rules. A
`// test-lint: allow <rule> <reason>` comment still exempts a hit, and
hits on unchanged lines still do not fail.
A never-run test that builds on macOS or Windows is still listed
without failing, since it runs locally on that platform.
Docs: docs/development.md.
A getPrototypeOf trap may return the same proxy again. Its second visit
replaced the positions the first visit recorded, so a name only the first
ownKeys call returned was never visited. Each visit now adds its new
positions to the proxy's record, each pair counted once against the heap
limit, and the records are sorted and compacted once after the walk.
The startup scripts run at launch no longer list the print service's
printers, so the first window does not wait on it; a script.startup.run
with any other reason still lists them. A script's print jobs that the
desktop's worker fails to send are shown in the status bar even when a
later line, a later batch that was sent or a startup script's failure
took it, and the startup script's notes stay in the hover.
script.startup.run's params text describes the print wait and the
launch rule.
The bounds getters (position, left, top, width, height and the bounds
arrays) read an item in a document in the back without measuring its type,
while the setters measure it after the switch to that document since
#10538. A script that read t.width and assigned it back could resize the
item, and every geometry assignment switched to the document and back even
when nothing changed.
The getters now measure type not measured yet in a document in the back
for an item that holds type, a symbol instance or a placed document, the
way the switch measures it, and the check is skipped while the document is
unchanged. An assignment equal to the current value of an object without
such content in a document in the back returns without switching
documents, and no undo step is made.
The Size list keyed a Windows printer's paper sizes by name, so a second
size with the same name (several Custom forms, for example) was dropped.
Each size is now kept, and sizes that share a name show their size in
inches after it, with a number when that name is still another form's.
Two driver sizes that both match one built-in size stay the printer's own
papers, so either can be picked.
Follows #10511.
A for-in loop asks only the proxies whose ownKeys trap listed a name for
its descriptor. When a getPrototypeOf trap returned a new proxy of the
same target on each call, the proxy met before each name was not the one
that listed it, so the name was skipped. The loop now records, for each
proxy, the proxy its prototype lookup returned, and a new proxy of that
same target in its place answers for it. Proxies that list nothing are
recorded too, so another proxy of their target does not answer for them,
and the listing proxies stay rooted until the iterator holds them.
Follows #10185.
The census rule leaves out a loop that feeds each entry into a
computation. It now checks that the computation runs, and that it runs
on the entry:
- An alias assigned another value no longer holds the entry, and one
assigned the entry holds it. Assignments in an empty loop, an async
block, a move closure or a closure the loop never calls do not change
the alias, and one that may be skipped does not make one.
- A nested for body counts only when its source is a literal range or
array that is not empty.
- A block in an earlier argument keeps the enclosing || or && that can
skip the call.
- Calling an async closure counts only when the future is awaited or
passed to block_on.
- A closure that is not bound with let counts only when it is called
where it is written; a parenthesized initializer binds the closure.
- A closure call resolves to the binding in scope at the call, so a
later let of the same name takes it.
- A conjunction inside a parenthesized operand of an asserted && is
required, unless an || at its level can bypass it.
A checked save (`write_atomic_checked`, used by the engine's file writes
while automation write roots are set) opens the destination folder once
and puts the file in place through that open folder. A folder moved
after it was opened still received the file, so moving it out of the
write root while the file was written placed the file outside the root.
After the file is written, before it takes the old file's permissions
and again right before it is renamed into place, the folder's current
path is checked again with the same check. The copy fallback checks it
before the target is opened and again before the target is created or
overwritten. A folder moved outside the root, or one whose current path
the system does not report (FreeBSD), is refused: the temporary file
and any copy of the old content are removed, and the error names the
original destination. A move within the root keeps working as before.
Follows the checked-write work in 4cb6f8f152 and 6cf9145890.
With test selection, a pull request that moves a crate between shards in
GROUPS without changing ci.yml could skip the shard holding the test
that compared the two. `shards::check`, which every shard and warm leg
runs, now compares them and fails with both lists.
The select legs failed because the shared gate's undeclared-read check
(craft-common-actions #451) still counts two paths as reads outside their
crate. The engine test built a relative path to a temporary folder from
"../".repeat(n), reported as a read of `crates`; the text build script
joined CARGO_MANIFEST_DIR with "../..", reported as a read of the
repository root. Neither reads a tracked file. The test now builds the
path from Component::ParentDir, and the build script takes the
manifest directory's grandparent; both give the same paths as before.