Skip to content

Allow journald package to build on Windows - #798

Merged
rs merged 1 commit into
rs:masterfrom
vzer200:fix/journald-windows-compatibility
Sep 8, 2026
Merged

rs merged 1 commit into
rs:masterfrom
vzer200:fix/journald-windows-compatibility

Conversation

@vzer200

@vzer200 vzer200 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #478. Follows the build-constraint removal proposed in #479, which was closed without merging.

The pinned go-systemd dependency already provides Windows stubs, but the !windows constraint excluded NewJournalDWriter when Windows applications imported this package. Remove that constraint and add a Windows regression for the unavailable-journal error and zero bytes written.

This enables compilation on Windows. Writing still returns the dependency's error because journald is unavailable there. No dependencies or existing writer logic change.

Validation on Windows/amd64:

  • The new regression fails to compile on the original source and passes with this change.
  • Go 1.23.12 and 1.24.13: both existing CI commands pass, including go test -race -bench . -benchmem ./... with default benchmark durations and go test -tags binary_log -race ./....
  • Go 1.26.8: full normal and binary race suites and go vet ./... pass. A separate consumer verifies public-package imports, input preservation and logger error propagation in both modes.
  • Formatting and diff checks pass. Existing Linux journal tests cross-compile; Linux tests were not run locally. Local race tests use LLVM-MinGW Clang, so the host is not identical to GitHub's Windows runner.

AI-assisted implementation with independent agent review of the final source and test evidence before submission.

@rs
rs merged commit 5eb5f3a into rs:master Sep 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow journald builds on Windows

2 participants