Repository navigation
Build and test the backend and cr on Windows - #96
Merged
Merged
Conversation
Phase 1 of the Windows 11 version: a Windows job in CI lints and tests cr-formats, cr-store, cr-i18n and cr, and builds cr.exe as an artifact. - The tests link the original's data through a helper that works on both systems, in place of std::os::unix::fs::symlink. - .gitattributes checks text files out with LF on Windows too. - On Windows the data package lives in Core Rules\data in the Documents folder Windows reports (windows-sys), and no Wine prefix is looked for. - cr's usage text names the platform's data folder, and a path with backslashes counts as a path. - The roadmap's step 2 and the decision log record the Windows plan (S13, P17 to P20); README and the website say Windows 11 comes next. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsxNQ7uDfBWWHEuyTvXtG9
On Windows every spelling of a name exists, so find_entry's shortcut gave back the spelling asked for (chars\index.chr) instead of the one on disk (Chars\INDEX.CHR) that the original and Linux see. There the folder is always read. The extraction test compares paths with / on both systems, and the Windows CI job reports every failing test, not just the first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsxNQ7uDfBWWHEuyTvXtG9
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.
Requested by Brahm · project thread
Phase 1 of the Windows 11 version (roadmap step 2): the backend crates and
crbuild, lint and test on Windows, before any Windows interface exists.Changes
windowsjob onwindows-2025runs clippy and the tests ofcr-formats,cr-store,cr-i18nandcr-cli, then buildscr.exeand uploads it as thecr-windows-x64artifact. The GTK crates stay Linux only.std::os::unix::fs::symlink, so they did not compile on Windows. They now go through a small helper (crates/cr-store/tests/common/mod.rs) that usessymlink_dirorsymlink_fileon Windows..gitattributeschecks text files out with LF on Windows too, so texts compared byte for byte stay the same. The two add-on CSVs keep their CRLF.data_package_dir()isCore Rules\datain the Documents folder Windows reports (SHGetKnownFolderPaththroughwindows-sys, so a Documents folder moved into OneDrive is found too).Installation::discover()does not look for a Wine prefix there.cr: the usage text and the package README name the platform's data folder. A path written with backslashes counts as a path, so a folder that does not exist is still reported. When nothing is found on Windows, the error names the data folder, not the Wine path.On Linux nothing changes:
cr --helpprints the same text as before.Checks
cargo clippy --target x86_64-pc-windows-gnu -p cr-formats -p cr-store -p cr-i18n -p cr-cli --all-targets -- -D warningspasses locally. Before this change the tests did not compile for Windows.cargo fmt --check, clippy andcargo testfor the same crates pass on Linux. The tests that use the helper also pass withCORERULES_DIRset to an Expansion data package.Generated by Claude Code