- upload_buffer and request_read check the device before returning a
recorded error other than a loss, so a device destroyed while its loss
callback is deferred reports GpuFault::DeviceLost. An out-of-memory error
still takes precedence over a validation error on a valid device.
- craft_gpu_device::native_descriptor includes OpenGL on Windows when it is
the only compiled native backend, and craft-gpu-wgpu uses that descriptor.
- An allocation error whose handling finds the device lost returns
GpuFault::DeviceLost instead of an allocation error, in upload_buffer and
request_read.
- request_read checks the device after submitting its copy, so a copy that a
destroyed device rejected does not become a pending read.
- On Windows, the context's instance includes OpenGL when it is the only
compiled native backend.
- craft_gpu_device::native_instance returns OpenError::NoAdapter when no wgpu
backend is compiled, instead of wgpu panicking.
- docs/gpu-backends.md says read_buffer waits for the read's own copy
submission.
`wait_between_reads` checked `DeviceHealth::fault()`, which reports an
out-of-memory error ahead of a recorded validation error. With both
recorded, it skipped the early stop, submitted empty work, and failed the
read with "Out of Memory". It now uses `polling_fault()` for the check and
for the returned error, as `poll_reads` does. An out-of-memory error alone
still waits normally, and a loss is still left to `poll_reads`.
docs/gpu-backends.md no longer says that `adapter-probe` turns on wgpu's
default native backends: the workspace sets wgpu to
`default-features = false`, and native backends come only from the
`native-*` features.
* Inspector: name generic components by their type and list a text field's value
The component name dropped the path before the generic arguments, so Select<'_, String> was
recorded as `String>`. A text node's value, which AccessKit reads, now also shows in the
inspector's facts.
* Inspector: test generic component names and text field values
* Keep the components of a replayed memoized view in the enclosing inspected region
* SwatchPair: each well's access node is named by its own label, not the pair's
* rustfmt
* Inspector: clippy tidy-ups in the replay step and its trial
* Inspector: a text field's value is journaled like the other steps, so a replayed view keeps it; the pair trial checks each name is its well's radio button
* inspect: list a text value whichever order the node's facts arrive in
A text value noted before its node's facts in the same pass was dropped, as it
was only written on facts that already existed. The open region now keeps the
noted value per component and writes it on the facts when they arrive, so the
order no longer matters; a value the node states itself still wins. The steps
journal and replay as before.
The trial drives the record's calls in each order: text value before facts,
facts before text value, facts reported again, and a node's own value.
* Inspector trial: a null-rooted id and a let-else in place of expect, for next's lints
* Inspector trial: assert the region ran instead of panicking, for next's lints
* docs: regenerate contract-api.md
* contract-api: an entry's summary is its first sentence, not its first line
The generator showed the first line of each item's doc comment, so an entry whose doc comment wrapped
mid-sentence ended on a dangling word: the press latch's `release` stopped at "an earlier", `swallows` at
"true for the", and about a quarter of the file's entries were cut off the same way.
The summary now carries the wrapped lines to the end of the first sentence, stopping at a colon that
introduces a list, so every entry reads whole. Only the clipped tails change: each completed entry keeps
its text and gains the rest of the sentence from the item's own doc comment. docs/contract-api.md is
regenerated with it.
* contract-api.md: regenerated after the merge of main (the generator's own output, not a hand merge)
* contract-api: a summary stops at its first sentence's end inside a line
`doc_summary` only stopped at the end of a line, so a doc line that held two sentences (`... release or
cancel. A press that begins while nothing is latched is not swallowed.`) carried both, and the entry was
two sentences long.
`sentence_end` now finds the boundary inside the line: a full stop, question or exclamation mark that ends
the line, or that a space and a capital letter follow, and never a run of dots (`(LRI ... PDI)`) or one of
the short forms e.g., i.e., cf., vs., etc., approx. The summary stops there; a colon that introduces a list
below still ends it too.
docs/contract-api.md is regenerated with the rebuilt binary.
* memo keys: whether a region is open; contract-api: no Self:: link targets
A memoized view's key held the props, the `fn` and what the scope around it hands down, but not whether an
inspected region was open. A view that settled outside a region kept a run that recorded no inspection steps
(`runtime::inspect::run` notes one only while a region is open), so when a region later wrapped the unchanged
view it replayed that run and the region's record showed none of its components: the inspector listed nothing
for what the region showed.
Whether a region is open now feeds the key, one byte after the show address, so a view settled outside a
region runs in the pass that shows it inside one and records the region's steps; a run made inside a region is
not replayed outside one either. `contract::inspect_region` trials both directions and the region's recorded
components, and `record`'s doc says why. Without the key byte that trial fails.
`doc_summary` also drops the target of a link that names the item's own type (`Self::zoom_x`), which rustdoc
resolves in the source and this file has no page for: the entry keeps its reference text, as the file writes
every name it cannot link. docs/contract-api.md is regenerated with the rebuilt binary: 77 lines, the 82 link
targets and nothing else, and a second run leaves it byte-identical.
Focused trials pass: ui-contract's `contract::inspect_region` (new), `memo`, `derived` and `contract::fixes`,
ui-widgets' `memo` and `runtime::inspect` (the region's components through a replay included), and
craft-menu's `keytips`.
* docs: regenerate the contract catalog on current main
Reviewer findings on #3214: `pressed_part`'s entry ended mid-sentence and said
nothing about the pass that ends the press, and `icon_ink_on`'s ended after
picking the higher-contrast token, leaving out the non-text contrast minimum the
implementation then applies.
The catalog lists the first line of each doc comment, so both now open with a
complete sentence that carries the boundary: `pressed_part` is the part in the
pass that ends the press and in none after it, and `icon_ink_on`'s ink is pushed
to the non-text minimum. The catalog is regenerated; the run also picks up two
entries the branch's merges added without regenerating (`Action::restore` and
`floated`'s doc), and a second run leaves the file byte for byte as it was.
The jump-release trials gain the passing sense: a press that clicks and passes
its drag, released past slop in the batch that presses again, ends with a
`Release` that claims no drag, as the click-and-drag sense does, and the new
press opens.
Tests: cargo test -p craft-behavior --lib -- press (18 passed, 4 of them the
jump-release trials).
Reviewer finding on #3446: the summary ended at a colon ("How much of a floating
layer stays inside the window when the user moves it, when it is placed at a
position, and ..."), and the catalog lists that line only — a variant's own doc
is never extracted. So the line is now a complete summary: the whole layer
(`Inside`, the default) or a strip of its title, with where the rule holds and
the overlay's own `bounds` in the paragraph under it. The variants keep their
detailed docs for rustdoc.
Regenerated with the branch's own generator; a second run leaves the file byte
for byte as it was. The run also picks up two entries the branch's merges added
without regenerating (`Action::restore`, and `floated`'s doc).
Reviewer finding on #3448: entries in `docs/contract-api.md` ended mid-sentence
(`size_ok` at "a `min` that is", `label_decimals`, and the `WindowSpec`,
`pressed_part` and `icon_ink_on` summaries). The generator lists the first line
of each doc comment only, so each of those doc comments now opens with a
complete sentence and keeps the rest below it: `size_ok` says on its second line
that a `min` that is not a number counts as one unit, `label_decimals` keeps its
cases in the paragraph under the summary, and `WindowSpec`'s first line carries
the whole "what it is for, who draws its frame, where it stands and whether it
has a taskbar entry" sentence.
Regenerated with the branch's own generator; a second run leaves the file byte
for byte as it was. Every entry this branch adds or changes now ends in a full
stop. The rest of the file keeps the entries the base leaves truncated (1273 of
4820 entry lines still end mid-sentence, none of them touched here): sweeping
those, or teaching the generator to join a doc's first sentence, is a separate
change.
The regeneration also picks up two entries the branch's merges added without
regenerating (`Action::restore`, and `floated`'s doc).