Title: feat(platform): Windows CI — abstract POSIX I/O, portable tests, PRIu64 (#10)#107
Open
jose-compu wants to merge 9 commits into
Open
Title: feat(platform): Windows CI — abstract POSIX I/O, portable tests, PRIu64 (#10)#107jose-compu wants to merge 9 commits into
jose-compu wants to merge 9 commits into
Conversation
- ci.yml: add windows-latest matrix entry with ilammy/msvc-dev-cmd, Ninja via choco, platform-split test/CLI steps, and RUNNER_TEMP smoke path - CMakeLists.txt: MSVC /utf-8 /EHsc /W3 flags, CRT deprecation suppressions, fuzz guard extended to WIN32 - tests: replace all /tmp/ paths with std::filesystem::temp_directory_path() helper; guard POSIX headers; fix popen/pclose; wrap WAL corruption test in _WIN32 guards - tools/logosdb-cli.cpp: replace %llu with PRIu64 (cinttypes) - README: add Windows build instructions Milestone: 0.13.0 Co-authored-by: Cursor <cursoragent@cursor.com>
- ci.yml: add windows-latest matrix entry with ilammy/msvc-dev-cmd, Ninja via choco, platform-split test/CLI steps, and RUNNER_TEMP smoke path - CMakeLists.txt: MSVC /utf-8 /EHsc /W3 flags, CRT deprecation suppressions, fuzz guard extended to WIN32 - tests: replace all /tmp/ paths with std::filesystem::temp_directory_path() helper; guard POSIX headers; fix popen/pclose; wrap WAL corruption test in _WIN32 guards - tools/logosdb-cli.cpp: replace %llu with PRIu64 (cinttypes) - README: add Windows build instructions Milestone: 0.13.0 Co-authored-by: Cursor <cursoragent@cursor.com>
… and clang-format
…-reservation beyond file size
On Windows, CreateFileA and the CRT ::open both default to omitting FILE_SHARE_DELETE, which prevents std::filesystem::remove_all from deleting a file while any handle to it is open — even from the same process. POSIX allows unlinking open files (the inode lives until the last fd closes), so tests that call remove_all while the logosdb handle is still in scope pass on Linux/macOS but throw on Windows. Fix every Windows file open: - platform.cpp: add FILE_SHARE_DELETE to both CreateFileA calls (mmap_open and mmap_reserve). - storage.cpp / metadata.cpp / wal.cpp: replace ::open with _sopen_s(..., _SH_DENYNO, ...) so the CRT handle also carries delete-sharing, mirroring POSIX unlink semantics.
On Windows, CreateFileA and the CRT ::open both default to omitting FILE_SHARE_DELETE, which prevents std::filesystem::remove_all from deleting a file while any handle to it is open — even from the same process. POSIX allows unlinking open files (the inode lives until the last fd closes), so tests that call remove_all while the logosdb handle is still in scope pass on Linux/macOS but throw on Windows. Fix every Windows file open: - platform.cpp: add FILE_SHARE_DELETE to both CreateFileA calls (mmap_open and mmap_reserve). - storage.cpp / metadata.cpp / wal.cpp: replace ::open with _sopen_s(..., _SH_DENYNO, ...) so the CRT handle also carries delete-sharing, mirroring POSIX unlink semantics.
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.
Summary
Closes #10 — Windows support for milestone 0.13.0.
windows-latestto the build matrix (Debug + Release) using MSVC viailammy/msvc-dev-cmd, Ninja via choco, platform-split test/CLI invocation steps, and$env:RUNNER_TEMPfor the smoke-test path/tmp/paths with atmp_path()helper backed bystd::filesystem::temp_directory_path(); guards POSIX headers (<unistd.h>,<fcntl.h>); fixespopen/pclose→_popen/_pclose; wraps the WAL corruption test in_WIN32guards using_open/_write/_commit/_close/utf-8,/EHsc,/W3),_CRT_SECURE_NO_WARNINGS, fuzz guard extended toWIN32%llu/(unsigned long long)withPRIu64from<cinttypes>Test plan
ubuntu-latest,macos-latest,windows-latest(Debug + Release)logosdb-cli info) runs on all three OS runners