Add Windows and macOS to CI build matrix and fix cross-platform issues - #451
Open
OrDTesters wants to merge 1 commit into
Open
Add Windows and macOS to CI build matrix and fix cross-platform issues#451OrDTesters wants to merge 1 commit into
OrDTesters wants to merge 1 commit into
Conversation
|
|
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.
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 includewindows-latestandmacos-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
\nbefore lexing and parsing.Changes
windows-latestandmacos-latestto the CI matrixCRLF/CR→LF) in QLexerDescription 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
QLexerinstead of replacing the script content insrc/main/java/com/alibaba/qlexpress4/aparser/SyntaxTreeFactory.java.