Skip to content

fix(build): improve Rust toolchain detection on Windows#105

Merged
TheVeryDarkness merged 19 commits intoRPL-Toolchain:masterfrom
FinParker:master
Feb 4, 2026
Merged

fix(build): improve Rust toolchain detection on Windows#105
TheVeryDarkness merged 19 commits intoRPL-Toolchain:masterfrom
FinParker:master

Conversation

@FinParker
Copy link
Contributor

No description provided.

@FinParker
Copy link
Contributor Author

fix(build): improve Rust toolchain detection on Windows, add relevant rustfmt.exe path

@stuuupidcat
Copy link
Collaborator

stuuupidcat commented Oct 16, 2025

Could you update the CI workflow to include Windows in the matrix? Specifically, please modify the os matrix in https://github.com/RPL-Toolchain/RPL/blob/master/.github/workflows/main.yml#L25, and ensure the tests pass on Windows.

@stuuupidcat
Copy link
Collaborator

stuuupidcat commented Oct 19, 2025

  • Don’t need to run cargo test on Windows anymore—Windows error messages use backslashes, which makes the output inconsistent. Just ensure it builds and runs on Windows.
  • Already sent you an invite to the RPL organization; please accept it when you have a moment.

@TheVeryDarkness
Copy link
Collaborator

Sorry, I didn't notice this. Let me take a look at it tomorrow.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances Windows compatibility for the RPL toolchain by improving Rust toolchain detection on Windows systems. The changes ensure the build process correctly locates rustfmt.exe on Windows platforms and adds CI testing for Windows.

Key changes:

  • Fixed rustfmt executable detection to use .exe extension on Windows
  • Added Windows to the CI matrix for continuous testing
  • Documented Windows-specific setup requirements

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
crates/rpl_parser/build.rs Platform-specific rustfmt executable detection for Windows compatibility
README.md Added Windows-specific installation instructions for RUSTUP_HOME setup
.github/workflows/main.yml Extended CI to test on Windows and added cargo caching

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Set default shell to bash for job runs.
Removed environment variable CARGO_TERM_COLOR from workflow.
@TheVeryDarkness
Copy link
Collaborator

It's weird that ''s aren't normalized to '/' by ui-test, and maybe I can debug this on a PC tomorrow or this weekend.

@TheVeryDarkness
Copy link
Collaborator

It's weird that ''s aren't normalized to '/' by ui-test, and maybe I can debug this on a PC tomorrow or this weekend.

See config.rs in ui_test.

@TheVeryDarkness
Copy link
Collaborator

It seems that the bug has been fixed in ui_test@0.30.2 (previously we're using ui_test@0.29.2). However, there are still some test failures in ui tests

TheVeryDarkness and others added 2 commits February 3, 2026 11:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TheVeryDarkness TheVeryDarkness self-assigned this Feb 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

//@ normalize-stderr-test: "\d+:\d+ ~ (\w+)\[[0-9a-f]{4}\]" -> "$1"
//@ normalize-stderr-test: "/.*/lib/rustlib/src/rust/library" -> "$$SRC_DIR"
//@ normalize-stderr-test: "span: (.*):(\d+):(\d+): (\d+):(\d+) \(#\d+\)" -> "span: $1:$2:$3: $4:$5 (#N)"
//@ normalize-stderr-test: "DefId\(\d+:\d+ ~ (\w+)\[[0-9a-f]{4}\]" -> "DefId($1"
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex replacement target is missing a closing parenthesis. It should be "DefId($1)" instead of "DefId($1". This will result in malformed output in the stderr normalization.

Suggested change
//@ normalize-stderr-test: "DefId\(\d+:\d+ ~ (\w+)\[[0-9a-f]{4}\]" -> "DefId($1"
//@ normalize-stderr-test: "DefId\(\d+:\d+ ~ (\w+)\[[0-9a-f]{4}\]" -> "DefId($1)"

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TheVeryDarkness
Copy link
Collaborator

Ah, finally

@TheVeryDarkness TheVeryDarkness merged commit 6378266 into RPL-Toolchain:master Feb 4, 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