- A `while n < bound` loop that adds to or subtracts from `n` in its body
counts its own passes, so calls in the bound (`attempts.len()`) no
longer exempt the sleep. A condition that also has `&&` or `||` keeps
its calls as polling evidence.
- A change to the loop or spawn closure around a reported sleep counts as
a change to the hit, so an edit that removes the poll from the
condition fails the changed-line check.
- `use std::thread::spawn as spawn_thread;` and
`use std::thread::sleep as nap;` no longer bring in the bare names, and
`thread::sleep_ms` no longer matches `thread::sleep`.
- A `thread::spawn` path counts only where a `use` binds `thread` to
`std::thread`, so a local `mod thread` with its own `spawn` is not
exempt.
- A `;` inside a nested block in a loop condition
(`while !ready({ let key = 1; key })`) no longer ends the header, and a
block after `||` stays part of the condition.
- A sleep in a `let` initializer block inside a dropped spawn closure is
exempt like the closure's other sleeps; the same block inside a polling
loop is still reported.
- A dropped-handle spawn counts only as `thread::spawn` through a path,
with or without a leading `::`, or as a bare `spawn` that a `use` brings
in. A local `fn spawn` that runs the closure at once is reported.
- A sleep that is the whole body of a closure without braces is judged by
the call that takes the closure: a dropped `thread::spawn` is exempt, and
a joined one is reported even inside a polling loop.
- A `loop` used as a `let` value is checked for polling calls.
- Calls inside the sleep's own argument and inside `stringify!` are not
polling work, and neither are `unwrap`, `expect` and the `unwrap_or`
family.
- `Duration::new` is matched per call, with `Duration` as a whole path
segment, so a local named `new` or `ScheduleDuration::new()` does not
change the result.
main's CI fails at test-lint since #8808 merged: keys_held_during_a_touchpad_gesture_count_until_it_ends is compiled only on macOS, which no CI test leg runs. egui reports a touchpad gesture's phases only on macOS; on Windows and Linux it reads a touchpad's Ctrl+scroll as a pinch, so the test cannot run there. The allow comment names that reason.
The poll check now:
- keeps a block condition (`while { r.load(SeqCst) } { ... }`) in the
loop header, so the loop counts as a poll, while a `m! { ... }` macro
before a loop still ends the statement before it;
- strips a loop label (`'outer: while ...`) before looking for the
keyword;
- treats `move || -> () { ... }` as a spawned closure, like `move || {`;
- does not take `return ::std::thread::spawn(...);` as a dropped handle,
since a keyword is not a path segment;
- does not count a nested `fn` item's name as a call in the loop.
A wait such as `while start.elapsed() < Duration::new(1, 0)` checks
only the clock, but the poll check counted its `new` call as a
condition and left the sleep unreported. `new` now counts as a time
call when every `new` in the loop is `Duration::new`, and the clock-only
wait cases include it.
The white square behind the Difference square was opaque, so the art behind
the group never reached the blend and the test gave the same answer with
isolation off. That square is now 50 % opaque. The test checks that the
isolating group gives one answer and that the same group without isolation
reports that the art behind the selection is not one color.
The `sleep` rule reported every `thread::sleep` in test code, so 24 of the
30 hits across the workspace were the pause of a loop that waits for a
condition (a search's progress, a flag's `load`, a tool's `poll`) with a
long deadline, or a spawned thread that opens a gate after 10 s in case
the test never does. None of those make a test pass or fail on time.
The rule now leaves out:
- a sleep in a `while` or `loop` whose condition or body calls a function
or method other than one that reads or converts a time, also when the
sleep sits under an `if` or `match` inside that loop;
- a sleep in a closure passed to `spawn` when the call is a whole
statement, so the test drops the thread's handle.
A loop that only waits for the clock (`elapsed`, `as_millis` and other
`Duration` reads), a counted loop, a `for` loop, a sleep under an `if`
outside a loop, and a spawned thread whose handle is kept, returned,
passed on or joined are still reported. Macros such as `println!` in a
loop do not count as a condition. The loop's head is read as a whole
statement, so braces inside it, as in `json!({})`, do not cut it short.
`cargo xtask test-lint --all` now lists 6 sleep hits instead of 30; each
of the 6 delays a gate or a poll that the test's result depends on.
General gets a Reset All Warning Dialogs button after the Show External
Script Warning row. It turns every warning that a Don't Show Again box
turned off back on in the Preferences window, and OK or Apply saves it.
The button is dimmed while every warning is on, so a click then changes
nothing. The warnings with a Don't Show Again box are listed in one place
(`WARNING_DIALOGS`), so a later dialog with the box joins the reset by
adding its preference there.
The params text of ui.livePaintGapOptions in
crates/ui-egui/src/menus/ui_commands.rs gained the failed-preview
sentence, but crates/mcp/src/ui_catalog.rs was not regenerated, so
`cargo xtask ui-commands --check` failed in CI. This is the output of
`cargo xtask ui-commands`.
When the planar map is skipped because the paths have too many pieces
(SHAPE_BUILDER_MAX_MAP_EDGES, added in 7a46d5ec56), too many segments
or exceed the sweep's work budget, Divide with open paths fell back to
the filled areas. It replaced the selection with the uncut shapes and
deleted the cutting paths without saying so. Live Paint built no faces:
Make reported the paths as too degenerate to paint, and with Gap
Detection a group could get its edges and no faces.
pathops now has try_pathfinder_with, try_live_paint and
try_live_paint_with_gaps, which return TooManyPieces in those cases
without sweeping the filled areas. Divide, Live Paint Make, Merge and
Gap Options use them and stop with an error that leaves the art
unchanged. The caps, and the fallbacks of pathfinder_with, live_paint,
live_paint_with_gaps and the Shape Builder, are unchanged.
When a Gap Options preview fails after one that found gaps, the dialog
no longer keeps drawing the earlier preview's gaps over the groups the
failure put back.
Docs: docs/mcp.md, the commands' params text and the Divide line in
docs/target-app-parity.md.
A PDF part without layers comes in on one layer named for its page. When
the editing data is set aside (a stale copy of another page size, say),
pairing that layer with the editing data's one layer locked art nothing
ties to it. Layers now take locks only by a name unique on both sides.
a_blend_mode_inside_an_isolating_group_answers_over_art_of_several_colors
only checked that color.contrast returned Ok. It now checks that the
answer has a ratio above 1 and a background color, and that the same
square in Normal mode gives a different ratio, so a contrast reading
that drops the blend mode fails the test.
a_replaced_sidecar_takes_no_inherited_acl and
a_replacement_takes_no_inherited_acl_the_old_file_lacked set the folder's
default ACL with setfacl and returned early when it was missing, so on a
Linux host without the acl package they passed without checking anything.
They now write the default ACL as the system.posix_acl_default extended
attribute through rustix, check that a new file takes it, and read the
replacement's access ACL with getxattr. They skip only when the file
system keeps no ACLs (EOPNOTSUPP); any other setup error fails the test.