Skip to content

Cargo.lock: gpu-allocator is back on the windows crate wgpu-hal uses, so main builds on Windows - #3459

Merged
HakanSeven12 merged 1 commit into
HakanSeven12:mainfrom
jespinolao:fix/lock-windows-build
Nov 23, 2026
Merged

HakanSeven12 merged 1 commit into
HakanSeven12:mainfrom
jespinolao:fix/lock-windows-build

Conversation

@jespinolao

Copy link
Copy Markdown
Contributor

The problem

Since 3fe6897 (#3418) main does not build on Windows. wgpu-hal 29.0.4 stops at ten errors in its DirectX 12 allocator code, and test (windows-latest) fails at cargo test (run on 0ca03459b). Ubuntu and wasm32 do not build that code and pass.

#3418 moved the iced revision, and resolving the lock file again moved three other things with it. Each is a package that takes a range of versions of one dependency, and each went to an older version the lock file holds for another package:

Package Takes Before #3418 Since The older one is there for
gpu-allocator 0.28.0 windows >=0.53, <=0.62 0.62.2 0.58.0 dwg-thumbnailer-win
os_pipe 1.2.3 windows-sys >=0.28, <=0.61 0.61.2 0.45.0 jni
swash 0.2.9 skrifa >=0.31.1, <=0.42 0.42.1 0.37.0 cosmic-text 0.15.0

The first is the break. wgpu-hal is on windows 0.62.2 and hands gpu-allocator its Direct3D 12 types, which are not the types of windows 0.58.0:

error[E0277]: the trait bound `ResourceCategory: From<&D3D12_RESOURCE_DESC>` is not satisfied
   --> wgpu-hal-29.0.4\src\dx12\suballocation.rs:299:32
    |
299 |             resource_category: gpu_allocator::d3d12::ResourceCategory::from(&raw_desc),
    |
help: the trait `From<&D3D12_RESOURCE_DESC>` is not implemented for `ResourceCategory`
      but trait `From<&windows::Win32::Graphics::Direct3D12::D3D12_RESOURCE_DESC>` is implemented for it
...
error: could not compile `wgpu-hal` (lib) due to 10 previous errors

The change

The three lines of Cargo.lock go back to what they were. The lock file is now the one before #3418 with the iced revision changed and nothing else; Cargo.toml is not touched.

The second and third are not part of the break. They go back with the first because they moved the same way and nothing asked for them: swash is what cosmic-text draws glyph outlines with, for the interface's text, and it is back on the skrifa it was on.

Checked on Windows 11

  • cargo metadata --locked takes the lock file as it is.
  • On main at 0ca0345, cargo test -p OpenCADStudio --lib stops at wgpu-hal, with the errors CI has.
  • With this change, cargo test --workspace --locked --no-fail-fast builds and runs: 7,754 passed, 2 failed, 49 ignored. Neither failure is about the lock file:
    • app::control::spellcheck::tests::speller_survives_com_unload_reload_cycles fails the same way on main at 0a00b7b on this machine, before Event loop busy-loops on stale redraw deadlines (iced 23604ff lacks iced-rs/iced@b54f2c59) #3418;
    • app::command_driver::tests::bedit_characterization_tests::picklocked_off_makes_locked_layer_objects_unselectable passes alone, six runs of six, and failed in the whole run and in one run of its module: it reads PICK_LOCKED, which is one flag for the process, while other tests set it.
  • cargo check --locked --target wasm32-unknown-unknown --lib passes, and cargo build --locked builds the application, which starts and draws.

OCS main at 0ca0345, Windows 11.

🤖 Generated with Claude Code

Since 3fe6897 (HakanSeven12#3418) main does not build on Windows: wgpu-hal 29.0.4
stops at ten errors in its DirectX 12 allocator code, and the Windows
test job fails at `cargo test`.

HakanSeven12#3418 moved the iced revision, and resolving the lock file again moved
three packages that take a range of versions of a dependency to an older
version the lock file holds for another package:

- gpu-allocator 0.28.0: windows 0.62.2 to 0.58.0
- os_pipe 1.2.3: windows-sys 0.61.2 to 0.45.0
- swash 0.2.9: skrifa 0.42.1 to 0.37.0

The first is the break: wgpu-hal is on windows 0.62.2 and hands
gpu-allocator its Direct3D 12 types, which are not those of windows
0.58.0. The three lines go back to what they were, so the lock file is
the one before HakanSeven12#3418 with the iced revision changed and nothing else.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@schoeller

Copy link
Copy Markdown
Contributor

Independent confirmation from a different angle (Linux-host cross-check of the windows target):

  • On the broken lock, cargo check --locked --target x86_64-pc-windows-gnu -p OpenCADStudio --lib reproduces CI's failure exactly: could not compile wgpu-hal (lib) due to 10 previous errors, same E0277/E0308 signatures (&ID3D12Heap: Param<ID3D12Heap, _> at CreatePlacedResource, ResourceCategory: From<&D3D12_RESOURCE_DESC>).
  • With gpu-allocator's edge back on windows 0.62.2, wgpu-hal compiles clean and the full consumer chain type-checks (-p wgpu -p iced, transitively iced_wgpu/iced_renderer/iced_widget/iced_winit).
  • The three-edge revert is byte-identical to the last-green lock (a634487e6), which carried green Windows CI from 2026-09-11 through 2026-11-21 — this restores the exact state the build was verified in for two months.

Cross-reference: #3460 inherits this breakage and temporarily carries the same one-line gpu-allocator restoration so its own Windows lanes can gate the PR's actual change; it rebases away cleanly once this merges. The os_pipe/swash restorations here go beyond the one-liner and are the right full revert.

schoeller added a commit to schoeller/OpenCADStudio that referenced this pull request Nov 22, 2026
…atest) failed on app::automation::tests::lasso_press_drag_selects, a pre-existing flake this branch's 10 added lib tests (8 panel_surfaces + 2 plugin_scene) surfaced by rescheduling the shared test binary: the identical test passed on the same base commit at 2026-11-22T17:10Z in HakanSeven12#3459's windows run (6748 passed, this test ok) and the same 6758-test suite passed the ubuntu lane of this very run; the PR's app-side diff is view-projection only (dock/view.rs panel body swap, new modules) and cannot reach the selection gesture path, whose gates (pick_first default true, held_ms>=250 vs the test's synthetic 260ms hold, press-point geometry) are deterministic on a monotonic clock; re-running to sample the flake again
@HakanSeven12
HakanSeven12 merged commit 671fc8e into HakanSeven12:main Nov 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants