This includes some small fixes to desktop Suggest code and tests due to changes
in the `suggest` app-services component. It also incorporates D243740 by
@daisuke since it's required for vendoring.
This vendor replaces exposure suggestions with dynamic suggestions in the
`suggest` component, which breaks a few desktop tests. I disabled them for now
and will address them in bug 1961040.
Depends on D244233
Differential Revision: https://phabricator.services.mozilla.com/D245826
Do this by upgrading `application-services` repos to a commit that
_only_ differs from the current one in its `rusqlite` dependency.
Differential Revision: https://phabricator.services.mozilla.com/D244233
Split out, because the upgrades are split into multiple commits, but we
require a single vendoring to avoid duplicated packages.
Differential Revision: https://phabricator.services.mozilla.com/D241959
Notable WebGPU CTS changes:
- Demotions from tier 2 to tier 3:
- `webgpu:shader,execution,expression,unary,{i32,u32}_conversion:f32:*` started regressing on Windows.
- Promotions to tier 2 from tier 3:
- Across all platforms:
- `webgpu:shader,execution,expression,call,builtin,cross:f32:*`
- `webgpu:shader,execution,expression,unary,i32_conversion:abstract_float:*`
- `webgpu:shader,execution,expression,unary,u32_conversion:abstract_float:*`
- `webgpu:shader,execution,limits:nesting_depth_braces:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_copy:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_elementwise:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_mixed:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:scalar_zero_value:*` was promoted on Linux and Windows, but stays in macOS on account of failing `f16` functionality. My guess is that these failures are also present on the other platforms, but we don't see the because `shader-f16` is not aviailable on our other CI platforms yet.
- From macOS, completing the set of all platforms passing:
- `f16` functionality, which, again, was likely not visible on our other CI platforms before:
- `webgpu:shader,execution,expression,call,builtin,cross:f16:*`
- `webgpu:shader,validation,decl,override:type:*`
- `webgpu:api,validation,capability_checks,limits,maxUniformBufferBindingSize:createBindGroup,at_over:*`
was promoted on Windows.
Differential Revision: https://phabricator.services.mozilla.com/D243593
Notable WebGPU CTS changes:
- Demotions from tier 2 to tier 3:
- `webgpu:shader,execution,expression,unary,{i32,u32}_conversion:f32:*` started regressing on Windows.
- Promotions to tier 2 from tier 3:
- Across all platforms:
- `webgpu:shader,execution,expression,call,builtin,cross:f32:*`
- `webgpu:shader,execution,expression,unary,i32_conversion:abstract_float:*`
- `webgpu:shader,execution,expression,unary,u32_conversion:abstract_float:*`
- `webgpu:shader,execution,limits:nesting_depth_braces:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_copy:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_elementwise:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_mixed:*`
- `webgpu:shader,validation,expression,call,builtin,value_constructor:scalar_zero_value:*` was promoted on Linux and Windows, but stays in macOS on account of failing `f16` functionality. My guess is that these failures are also present on the other platforms, but we don't see the because `shader-f16` is not aviailable on our other CI platforms yet.
- From macOS, completing the set of all platforms passing:
- `f16` functionality, which, again, was likely not visible on our other CI platforms before:
- `webgpu:shader,execution,expression,call,builtin,cross:f16:*`
- `webgpu:shader,validation,decl,override:type:*`
- `webgpu:api,validation,capability_checks,limits,maxUniformBufferBindingSize:createBindGroup,at_over:*`
was promoted on Windows.
Differential Revision: https://phabricator.services.mozilla.com/D243593
Split out, because the upgrades are split into multiple commits, but we
require a single vendoring to avoid duplicated packages.
Differential Revision: https://phabricator.services.mozilla.com/D241959
Split out, because the upgrades are split into multiple commits, but we
require a single vendoring to avoid duplicated packages.
Differential Revision: https://phabricator.services.mozilla.com/D241959
WRT WebGPU CTS, we have some interesting changes:
- Promotions from tier 3 to tier 2:
- `webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds:*`
- All of `webgpu:shader,execution,expression,binary,ai_arithmetic:*` on Windows and Linux.
- Some of `webgpu:shader,execution,expression,binary,bitwise:*` on Windows and Linux:
- `…:bitwise_and:*`
- `…:bitwise_exclusive_or:*`
- `…:bitwise_or:*`
- `webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds:*`
- Some of `webgpu:shader,execution,expression,unary,*` on Windows and Linux:
- `…,ai_assignment:abstract:*`
- `…,ai_assignment:abstract:*`
- `…,ai_complement:complement:*`
- `webgpu:shader,execution,limits:switch_case_selectors:*` on Windows and macOS.
- `webgpu:shader,execution,limits:workgroup_array_byte_size_override:*` on all but Windows debug.
- `webgpu:shader,execution,zero_init:compute,zero_init:*` on macOS.
- `webgpu:shader,validation,expression,access,vector:abstract:*`
- `webgpu:shader,validation,expression,call,builtin,textureGather:offset_argument,non_const:*` on all but Windows debug.
- `webgpu:shader,validation,expression,call,builtin,textureSample:offset_argument,non_const:*`
- `webgpu:shader,validation,expression,call,builtin,textureSampleGrad:offset_argument,non_const:*`
- Most of `webgpu:shader,validation,statement,switch:*`:
- `…:case_types_match:*`
- `…:condition_type_match_case_type:*`
- `…:parse:*`
- Demotions from tier 2 to tier 3:
- `webgpu:api,validation,capability_checks,limits,maxColorAttachmentBytesPerSample:beginRenderPass,at_over:*`
- Otherwise notable potential regressions:
- `webgpu:shader,validation,expression,matrix,mul:overflow_scalar_abstract:*`
Differential Revision: https://phabricator.services.mozilla.com/D242218
This vendors the `desktop-138` branch [1] of application-services. The `main`
branch currently does not have some PRs that desktop needs because they break
mobile, and we need this on desktop ASAP.
This patch is larger than usual because the vendor includes some major changes
to the application-services `suggest` component, including new and changed API.
As a consequence this patch includes the following important changes:
## New `suggest` API & uniffi
`SuggestStoreBuilder::remote_settings_service` and `RemoteSettingsService::new`
are exposed to JS as synchronous functions. There's no need for them to be
off-main-thread.
## Telemetry
The labels of `suggest.ingest_time`, `ingest_download_time` and `query_time` had
to be updated due to changes in the Rust component. These are minor updates that
don't need a data review.
## Urlbar
I had to make the following changes to urlbar. I tried to keep them to a minimum
for now. There are opportunities for improvements in follow-ups.
* Appropriate minimal integration changes to `SuggestBackendRust` for creating
the `SuggestStore` and setting up the RS config
* The Rust component uses new RS collections, which breaks tests. I tried to fix
them without touching too many lines. There are definitely opportunities to
improve these tests and test helpers that I'd like to come back to.
* A fix to `RemoteSettingsServer` that's required due to the new RS client used
by the Rust component
## Late writes due to the new RS client & `AsyncShutdown`
This is a urlbar change but it's worth calling out separately. I pushed all
these changes to tryserver, and there was a failure at the end of the browser
Suggest tests due to `LateWriteObserver` [2].
The late write happens when the app exits: `SuggestStore` is dropped, which
causes the new app-services RS client to drop its Sqlite connection, which
causes Sqlite to sync the RS client's DB to disk. This hasn't been a problem
before because `suggest` currently uses the old RS client, which doesn't keep a
DB. (`suggest` does have its own separate Sqlite DB, and I didn't investigate
why this isn't a problem for it, mainly because it makes sense that the new RS
client would sync its DB when it's dropped and that might be considered a "late
write" when it happens on app shutdown.)
According to the stack in the log, `SuggestStore` is dropped by
`nsCycleCollector`. I can't see how `SuggestBackendRust.#store` is involved in a
cycle, and I don't know if something in this patch is causing a cycle where
there wasn't one before. Maybe there always was. And I don't know if the cycle
is what's causing the all this to happen too late on shutdown. Maybe it's
unrelated. (I'll paste the stack in a Phabricator comment.)
The `SuggestStore` is definitely kept alive until
`AsyncShutdown.profileBeforeChange` since we have a barrier for that phase that
calls `interrupt()` on it. Maybe that's simply the problem and we're using a
phase that's too late in shutdown. But again I don't know why it wouldn't also
be a problem for Suggest's own DB.
The only fix I found is to replace `AsyncShutdown.profileBeforeChange` with
either `quitApplicationGranted` or `profileChangeTeardown`, and then null out
`#store` in the callback (after we call `interrupt()` on it). I assume that
fixes it because `profileBeforeChange` runs later than those other two phases.
So I replaced `profileBeforeChange` with `profileChangeTeardown`. I don't know
which of `quitApplicationGranted` or `profileChangeTeardown` is better. I think
it probably doesn't matter. I chose `profileChangeTeardown` because it's closer
to `profileBeforeChange`. (The order is: `quitApplicationGranted`,
`profileChangeTeardown`, `profileBeforeChange`.)
[1] https://github.com/mozilla/application-services/tree/desktop-138
[2] https://treeherder.mozilla.org/jobs?repo=try&revision=1639f87aa46f1afaf50901d80c8282861700019b
Differential Revision: https://phabricator.services.mozilla.com/D240919
Nested declarations were getting the location of their parent rule, which would
cause issue in the DevTools Inspector (e.g. for InspectorUtils.getRelativeRuleLine).
We now track the first declaration of the nested declaration to set it as the location
of the rule.
This required some changes in upstream cssparser that are vendored in this patch:
- 5e477ab819
- 958a3f098a
Differential Revision: https://phabricator.services.mozilla.com/D238911
WebGPU CTS run: https://treeherder.mozilla.org/jobs?repo=try&revision=02e0b7243aedb87972250504dd6bf64d74ff3f96
I updated the patch with the expectations from that run.
There were some regressions in tier 2:
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureStore/cts.https.html.ini`
- test path: `webgpu:shader,execution,expression,call,builtin,textureStore:bgra8unorm_swizzle:*`
- with error: "Error: Unexpected validation error occurred: Shader module creation failed: Parsing error"
- see: https://treeherder.mozilla.org/logviewer?job_id=496834446&repo=try&lineNumber=3089
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/call/builtin/value_constructor/cts.https.html.ini`
- new failures related to vector/matrix constructors with abstract types
- see: https://treeherder.mozilla.org/logviewer?job_id=496835790&repo=try&lineNumber=2094
There were also a new failures in tier 3 related to abstract types:
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/and_or_xor/cts.https.html.ini`
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/bitwise_shift/cts.https.html.ini`
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/comparison/cts.https.html.ini`
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/div_rem/cts.https.html.ini`
Overall, there were lots of new passes related to abstract types and I suspect those new failures were actually false positives previously.
Limit tests at `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/` are as noisy as always...
One more try push with all the changes: https://treeherder.mozilla.org/jobs?repo=try&revision=e3b4d3b039ca9e84aa2f4ec0b824c4530f41695d
Differential Revision: https://phabricator.services.mozilla.com/D239942
This migration was non-trivial!
On the WebGPU side, a change in how load and store operations in render
attachments were represented meant that we needed to re-work FFI for
`RenderPassDepthStencilAttachment` and `RenderPassColorAttachment`, with
most of the effort going towards the former. These types, along with
`Option`, needed FFI-friendly replacements for `Option` and the related
types in `wgpu-core`.
There was also some housekeeping done to avoid duplicate dependencies:
* Create `thiserror` shim that downgrades v2 → v1. Otherwise, v2 would
be brought in by the new WGPU. We can't go in the opposite direction
yet, because `bitsclient` has code that breaks on upgrade. The next
patch in this series addresses this, and reverses the direction of the
shim.
* Also remove the now-unused shim adapting from `cfg_aliases` 0.1 to
0.2.
Co-Authored-By: Jim Blandy <jimb@red-bean.com>
Differential Revision: https://phabricator.services.mozilla.com/D233192
This migration was non-trivial!
On the WebGPU side, a change in how load and store operations in render
attachments were represented meant that we needed to re-work FFI for
`RenderPassDepthStencilAttachment` and `RenderPassColorAttachment`, with
most of the effort going towards the former. These types, along with
`Option`, needed FFI-friendly replacements for `Option` and the related
types in `wgpu-core`.
There was also some housekeeping done to avoid duplicate dependencies:
* Create `thiserror` shim that downgrades v2 → v1. Otherwise, v2 would
be brought in by the new WGPU. We can't go in the opposite direction
yet, because `bitsclient` has code that breaks on upgrade. The next
patch in this series addresses this, and reverses the direction of the
shim.
* Also remove the now-unused shim adapting from `cfg_aliases` 0.1 to
0.2.
Differential Revision: https://phabricator.services.mozilla.com/D233192