mirror of
https://github.com/ZSeven-W/openpencil.git
synced 2026-05-31 19:04:29 +07:00
fix(shell-native): enable winit Linux backends + LF line endings for cross-OS CI
Two unrelated CI failures on the P0 probe gate matrix, fixed together
because both gate the same workflow:
1. ubuntu-latest: winit 0.30 with `default-features = false` triggers
`compile_error!("The platform you're compiling for is not supported by
winit")` because no Linux backend (`x11` / `wayland`) is enabled.
Adds explicit `["x11", "wayland", "wayland-csd-adwaita", "rwh_06"]`
features so the prod skeleton dep compiles on every desktop OS.
macOS / Windows backends auto-activate via `cfg(target_os)`, so they
don't need explicit features.
2. windows-latest: `cargo fmt --check` failed with `Incorrect newline
style` — actions/checkout normalized .rs files to CRLF on the
Windows runner, but rustfmt.toml pins `newline_style = "Unix"`.
Adds `.gitattributes` enforcing `eol=lf` on all text (and explicit
`*.rs` / `*.toml`) so checkouts stay LF on every platform.
Both fixes are minimal and scoped to the P0 probe gate. The transient
dev-dep block (skia-safe / glutin / glow / etc.) is unchanged.
This commit is contained in:
parent
8b49ade193
commit
aef9b96480
2 changed files with 30 additions and 1 deletions
22
.gitattributes
vendored
Normal file
22
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Force LF on all text files when checking out (so cross-OS rustfmt
|
||||
# `newline_style = "Unix"` stays green on Windows runners). Without this
|
||||
# Windows checkout normalizes to CRLF, breaking `cargo fmt --all -- --check`.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Rust sources must remain LF — explicit override.
|
||||
*.rs text eol=lf
|
||||
*.toml text eol=lf
|
||||
|
||||
# Binary files Git should not touch.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.webp binary
|
||||
*.ico binary
|
||||
*.icns binary
|
||||
*.pdf binary
|
||||
*.zip binary
|
||||
*.gz binary
|
||||
*.tar binary
|
||||
*.bin binary
|
||||
|
|
@ -22,8 +22,15 @@ openpencil-shell-core = { path = "../openpencil-shell-core", version = "0.1.0" }
|
|||
# 原因:Rust 1.80 toolchain (rust-toolchain.toml) 对 home/hashbrown 等 crate 当前
|
||||
# 版本的 edition2024 / MSRV 1.81+ 需求不兼容,加完整依赖会导致下载阶段失败。
|
||||
# 详见提交说明 + Phase 1 Gate codex review。
|
||||
#
|
||||
# winit features 说明:on Linux 必须显式开 `x11` 和/或 `wayland`,否则
|
||||
# `platform_impl/mod.rs` 触发 `compile_error!("The platform you're compiling for is
|
||||
# not supported by winit")`. macOS / Windows 各自的 backend 通过 cfg(target_os)
|
||||
# 默认启用,不需要 feature flag。Step 1a 只在三大桌面 OS 跑 CI,所以同时打开
|
||||
# x11 + wayland 两个 Linux backend 就够。Stage F 真正接 RenderBackend 时会
|
||||
# 重新审视(可能加 `serde` / `rwh_06` 等)。
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
winit = { version = "0.30", default-features = false }
|
||||
winit = { version = "0.30", default-features = false, features = ["x11", "wayland", "wayland-csd-adwaita", "rwh_06"] }
|
||||
|
||||
# TRANSIENT (Step 1a P0 CI gate only — reverted after notes commit, before Task 1 starts).
|
||||
# These deps power `examples/p0_probe.rs` + `tests/p0_probe.rs` (gated `#[ignore = "P0_PROBE_GATE"]`).
|
||||
|
|
|
|||
Loading…
Reference in a new issue