chore: code quality#196
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves repo “code quality” by centralizing platform/asset specifications for xtask, adding a new validate-versions command to keep version pins consistent across workspace files, and reducing workflow duplication via a reusable GitHub composite action.
Changes:
- Centralize platform targets, artifact names, and required bundle/pack/validate file lists into
xtask/src/platform.rs, and refactor pack/validate/bundle scripts to consume it. - Add
cargo xtask validate-versions(+ CI job) to cross-check versions acrossCargo.toml,Cargo.lock,package.json, andmise.toml. - Introduce
.github/actions/setup-rust-cefand refactor workflows to use it; add unit tests for software popup compositing and update contributing docs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
xtask/src/validate.rs |
Switch validation loop to use centralized PLATFORM_SPECS. |
xtask/src/validate_versions.rs |
New command to validate version/toolchain pins across workspace files. |
xtask/src/platform.rs |
New single source of truth for platform targets/artifacts/required assets (+ tests). |
xtask/src/pack.rs |
Use PLATFORM_SPECS for artifact copy/validation instead of local tuples. |
xtask/src/main.rs |
Wire up validate-versions subcommand and new modules. |
xtask/src/bundle_windows.rs |
Replace duplicated Windows target/assets constants with platform module specs. |
xtask/src/bundle_linux.rs |
Replace duplicated Linux target/assets constants with platform module specs. |
xtask/src/bundle_common.rs |
Remove required_paths_for_platform; make workspace_root public for version validation. |
mise.toml |
Update cargo:export-cef-dir pin to match the current CEF version. |
crates/software_render/src/lib.rs |
Add unit tests for composite_popup behavior (clipping/out-of-bounds). |
CONTRIBUTING.md |
Update repo layout and add guidance for running tests + new validation commands. |
.github/workflows/test.yml |
Refactor setup steps to the composite action; add validate-versions job. |
.github/workflows/build.yml |
Refactor setup steps to the composite action; validate packaged addon after pack. |
.github/actions/setup-rust-cef/action.yml |
New composite action to install deps/toolchain, cache Cargo/CEF, and download CEF. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+175
to
+180
| fn runtime_assets_include_pack_validation_requirements() { | ||
| for target in [WINDOWS_X64_TARGET, WINDOWS_ARM64_TARGET] { | ||
| let Some(spec) = platform_spec(target) else { | ||
| assert!(platform_spec(target).is_some(), "windows spec should exist"); | ||
| continue; | ||
| }; |
Comment on lines
+189
to
+193
| for target in [LINUX_X64_TARGET, LINUX_ARM64_TARGET] { | ||
| let Some(spec) = platform_spec(target) else { | ||
| assert!(platform_spec(target).is_some(), "linux spec should exist"); | ||
| continue; | ||
| }; |
Comment on lines
+11
to
+13
| let workspace_version = quoted_value(&cargo_toml, "version") | ||
| .ok_or("Cargo.toml is missing workspace.package version")?; | ||
| let package_version = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.