Skip to content

Add Windows and macOS to CI build matrix and fix cross-platform issues - #451

Open
OrDTesters wants to merge 1 commit into
alibaba:mainfrom
OrDTesters:pr-branch
Open

Add Windows and macOS to CI build matrix and fix cross-platform issues#451
OrDTesters wants to merge 1 commit into
alibaba:mainfrom
OrDTesters:pr-branch

Conversation

@OrDTesters

Copy link
Copy Markdown

What is the purpose of this PR

We were unable to access the account from which we originally opened PR #445. Rather than waiting to recover that account, we've opened this new PR with the same changes, incorporating the feedback and addressing the review comments from the previous PR. We apologize for the inconvenience.

The CI workflow currently runs only on ubuntu-latest. This PR extends the build matrix to include windows-latest and macos-latest, and fixes a platform-specific issue that was uncovered when running the test suite on Windows.

Expected Result

The project builds and tests successfully on Ubuntu, Windows, and macOS with consistent behavior across platforms.

Windows-specific issue

Multi-line string literals fail on Windows

Expected:
assert("hello\nworld" == "hello\nworld") passes on all platforms.

Actual:
The assertion fails on Windows.

Why:
Windows uses \r\n (CRLF) line endings, while Unix-based systems use \n (LF). Scripts read from disk therefore contain different newline sequences depending on the platform, causing multi-line string literals to produce different values.

Fix:
Normalize all line endings to \n before lexing and parsing.

Changes

  • Add windows-latest and macos-latest to the CI matrix
  • Normalize line endings (CRLF/CRLF) in QLexer

Description of Fix

Scripts are now normalized to use Unix-style line endings (\n) before tokenization and parsing. This removes platform-dependent differences in multi-line string literals and ensures scripts behave consistently on Windows, macOS, and Linux.

Updates

Addressed the review from @DQinYuan by implementing the suggested approach: modifying QLexer instead of replacing the script content in src/main/java/com/alibaba/qlexpress4/aparser/SyntaxTreeFactory.java.

@CLAassistant

CLAassistant commented Jun 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants