fix: Windows portability in shipped code, with CI lanes to keep it - #213
Merged
Conversation
The suite passes on Windows since DataHaskell#212; these lanes keep it that way. Runs the cabal.project.ci subset on windows-latest and macos-14 at the ends of the tested GHC range (9.6.7, 9.12.2).
Same classes DataHaskell#212 fixed in tests. CSV and HTML writers and the lazy reader used locale handles; pin them to UTF-8. 'start' is a cmd builtin, so launch it through a shell. lazy-bench wrote to /tmp, which Windows lacks; use the system temp dir.
mchav
requested changes
Aug 20, 2026
|
|
||
| defaultFile :: FilePath | ||
| defaultFile = "/tmp/lazy_1b.csv" | ||
| -- /tmp does not exist on Windows. |
Member
There was a problem hiding this comment.
We can remove this comment. Please review the PRs for comment hygiene.
| import qualified Data.Text.Encoding as TE | ||
| import qualified Data.Text.IO as TIO | ||
|
|
||
| -- UTF-8 byte mode; locale handles corrupt output on Windows. |
| Nothing -> (0, totalRows') | ||
| Just (start, len'') -> (start, min len'' (totalRows' - rowsRead opts)) | ||
| withFile path ReadMode $ \handle -> do | ||
| -- Decode UTF-8, not the locale. |
Member
There was a problem hiding this comment.
This comment restates the line of code.
| "mingw32" -> openFileSilently "start" fullPath | ||
| "darwin" -> openFileSilently "open" fullPath | ||
| _ -> openFileSilently "xdg-open" fullPath | ||
| -- 'start' is a cmd builtin; it needs a shell. |
Member
There was a problem hiding this comment.
You can out this in the PR description rather than a comment.
Contributor
Author
|
Done. Swept both PRs. |
mchav
approved these changes
Aug 20, 2026
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.
Follow-up to #212: the test suite passes on Windows now, but the same defect classes were still in shipped code, and nothing runs CI there. This fixes the library/app side and adds lanes so it stays fixed.
Library and app fixes:
startas an executable. It is a cmd builtin and needs a shell, so web plots never opened on Windows.CI: windows-latest and macos-14 lanes over the cabal.project.ci subset at the ends of the tested GHC range (9.6.7, 9.12.2), mirroring the ubuntu workflow. Four runner jobs per push/PR; trim the matrix if that is too much.
Validated on my fork: all four new lanes green (https://github.com/skymanbp/dataframe/actions/runs/32211640843), the library fixes green on Presubmit + ubuntu (https://github.com/skymanbp/dataframe/actions/runs/32215828900), and the merged branch green locally on Windows 11 (full
cabal test allover every package in cabal.project.ci: 1097 + 134 + 193 + 61 + 10 cases, 0 failures).Out of scope: stdout locale encoding in the terminal display paths — that is process-global policy, not a file handle the library owns.