Skip to content

Conversation

@FinParker
Copy link

No description provided.

@FinParker
Copy link
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

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.

## Quick Start

1. Clone the repository and enter the directory: `git clone https://github.com/RPL-Toolchain/RPL.git && cd RPL`
1. Clone the repository and enter the directory: `git clone https://github.com/RPL-Toolchain/RPL.git && cd RPL` (When Used on Windows, you should first set your RUSTUP_HOME environment variable, normally `%USERPROFILE%\.rustup`)
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

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

Corrected capitalization of 'Used' to 'used'.

Suggested change
1. Clone the repository and enter the directory: `git clone https://github.com/RPL-Toolchain/RPL.git && cd RPL` (When Used on Windows, you should first set your RUSTUP_HOME environment variable, normally `%USERPROFILE%\.rustup`)
1. Clone the repository and enter the directory: `git clone https://github.com/RPL-Toolchain/RPL.git && cd RPL` (When used on Windows, you should first set your RUSTUP_HOME environment variable, normally `%USERPROFILE%\.rustup`)

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +41
~/.cargo/registry
~/.cargo/git
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

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

The cache paths use Unix-style home directory paths (~/.cargo/) which won't work correctly on Windows. Consider using ${{ runner.tool_cache }} or platform-specific paths, or use a conditional cache configuration per OS.

Suggested change
~/.cargo/registry
~/.cargo/git
${{ runner.os == 'Windows' && env.USERPROFILE || '~' }}/.cargo/registry
${{ runner.os == 'Windows' && env.USERPROFILE || '~' }}/.cargo/git

Copilot uses AI. Check for mistakes.
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

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