Skip to content

internal: Fix the six Windows-only native test failures and run the full suite there#643

Merged
xerial merged 1 commit into
mainfrom
fix/native-windows-remaining-tests
Jul 8, 2026
Merged

internal: Fix the six Windows-only native test failures and run the full suite there#643
xerial merged 1 commit into
mainfrom
fix/native-windows-remaining-tests

Conversation

@xerial

@xerial xerial commented Jul 8, 2026

Copy link
Copy Markdown
Member

Description

Follow-up to #641, which got NativeServer linking on Windows but had to scope the Scala Native (Windows) job to wvlet.uni.http.* because six tests elsewhere failed there. This fixes all six and widens the job to the full projectNative/test.

None were socket-related — they were pre-existing gaps that only became reachable once the native binary could run on Windows at all.

Test Cause Fix
IOSymlinkTest (3) Symlinks are unsupported on Scala Native + Windows — uni's own createSymlink/readSymlink throw UnsupportedOperationException there skip when IOPath.isWindows
IOPathTest.resolve child path Expectation mixed a literal / prefix with IOPath.separator; .path renders every separator with the platform's, so Windows gives \home\user\docs\file.txt Build the expected string with separator throughout, matching the sibling assertion below it
JSONTest.format JSON value stripMargin source literal arrives CRLF; formatter emits LF .gitattributes
YAMLFormatterTest.format json into YAML same .gitattributes

The last two are a checkout artifact: the repo had no .gitattributes, so actions/checkout honoured Windows' core.autocrlf=true and checked the sources out CRLF. * text=auto eol=lf forces LF in every working tree. Verified no file in the index currently has CRLF (git ls-files --eol), so this is a no-op on existing content and there are no .bat/.cmd/.ps1 files that would want CRLF. HTTP's \r\n are Scala string literals, unaffected by file line endings.

Verification

IOPathTest (19), IOSymlinkTest (3), JSONTest (5), YAMLFormatterTest (1) all pass on macOS Scala Native and JVM — the fixes are no-ops off Windows (separator is /, isWindows is false, files are already LF). The Scala Native (Windows) job in this PR is the real check: it now runs projectNative/test in full, so if any of the six still failed it would go red.

Related Issue/Task

Follow-up to #641. Closes uni's remaining Windows Scala Native test gaps, so the Windows job now covers the whole native suite rather than a subset.

Checklist

  • This pull request focuses on a single task.
  • The change does not contain security credentials

🤖 Generated with Claude Code

… suite there

With NativeServer running on Windows, projectNative/test surfaced six failures that
were simply unreachable before. None are socket-related; all are the tests meeting
Windows for the first time.

- IOSymlinkTest (3): symlinks are unsupported on Scala Native + Windows — uni's own
  createSymlink/readSymlink throw there — so skip when IOPath.isWindows.
- IOPathTest "resolve child path": the expected string mixed a literal "/" prefix
  with IOPath.separator, but .path renders every separator with the platform's, so
  Windows yields \home\user\... Build the expectation with separator throughout,
  matching the sibling assertion just below it.
- JSONTest / YAMLFormatterTest: their stripMargin literals arrive CRLF because the
  repo had no .gitattributes and checkout honours Windows' core.autocrlf, while the
  formatters emit LF. Add `* text=auto eol=lf` to force LF in every working tree.

Widen the Scala Native (Windows) job from the http subset back to projectNative/test.
@github-actions github-actions Bot added the bug Something isn't working label Jul 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request improves Windows compatibility for Scala Native tests. It introduces a .gitattributes file to enforce LF line endings, updates path resolution tests to use platform-specific separators, and skips symlink tests on Windows where they are unsupported. Additionally, the ADR documentation is updated to reflect these test fixes and the expansion of the CI test suite on Windows. No review comments were provided, so there is no additional feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@xerial

xerial commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Full Windows Native suite is green

projectNative/test on windows-latest:

Total: 1441 tests, 1429 passed, 3 skipped, 9 pending

0 failed. The 3 skipped are IOSymlinkTest (correctly skipping on Windows); IOPathTest, JSONTest and YAMLFormatterTest — the other three that failed before — now pass. So the six are genuinely fixed, not hidden, and the job covers the whole native suite. Linux Native also passes the full suite, confirming the IOPath and .gitattributes changes are no-ops off Windows.

@xerial

xerial commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several fixes to ensure the test suite runs successfully on Windows for Scala Native. It adds a .gitattributes file to enforce LF line endings, updates IOPathTest to use platform-specific path separators, and skips symlink tests in IOSymlinkTest when running on Windows. Additionally, the ADR documentation is updated to reflect these changes. I have no further feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@xerial xerial merged commit 61ef884 into main Jul 8, 2026
16 checks passed
@xerial xerial deleted the fix/native-windows-remaining-tests branch July 8, 2026 22:34
xerial added a commit to wvlet/wvlet that referenced this pull request Jul 8, 2026
**Description**

Bumps uni from 2026.1.18 to 2026.1.20.

**Note:** wvlet's `Native` workflow on `main` is **already green** —
Scala Steward's earlier bump to 2026.1.18 (#1876) picked up the actual
fix (wvlet/uni#640, `uni_curl_shim.c` building on Windows) and both
Windows native jobs now pass on `main`. So this is a version-currency
bump, not an unblock.

What 2026.1.19 → 2026.1.20 adds on top:

- **wvlet/uni#641** (v2026.1.19) — `NativeServer` links and runs on
Windows (`WSAStartup` / `WSAPoll` / `closesocket` shim). Gives uni a
real `Scala Native (Windows)` CI job, so this class of break now fails
in uni's own CI rather than surfacing downstream here.
- **wvlet/uni#643** (v2026.1.20) — remaining Windows-only native test
gaps closed; uni's Windows Native job runs the full `projectNative/test`
(1441 tests green).

The value here is that wvlet builds against the uni version whose
Windows Scala Native support is actually exercised by upstream CI, so a
future regression is caught in uni rather than here.

`langJVM/Test/compile` is clean against the new version — no wvlet code
changes.

**Note on CI coverage:** wvlet's own Windows native jobs are gated to
`push` on `main` (they're expensive), so they don't run on this PR —
they'll run post-merge on `main`. The identical uni shims are already
validated by uni's own green `Scala Native (Windows)` job.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant