Skip to content

Conversation

@agluszak
Copy link
Contributor

@agluszak agluszak commented Jan 4, 2026

This change enables Windows builds and tests in the CI pipeline and fixes
various Windows compatibility issues throughout the codebase.

Platform-specific path handling:

  • Replace /dev/null with ctx.actions.declare_file for null outputs on Windows
  • Use platform-appropriate path separators in classpath construction
  • Fix bzlmod classpath resolution for Kotlin compiler on Windows

Ktlint fixes:

  • Simplify ktlint_fix and ktlint_test implementations
  • Use proper argument files instead of shell-specific constructs
  • Remove windows.bzl utility in favor of inline platform checks

Test infrastructure:

  • Convert integration test runner to java_binary for cross-platform support
  • Fix temporary file handling in tests for Windows compatibility
  • Update test assertions to handle platform-specific path formats

CI configuration:

  • Enable Windows builds in presubmit.yml
  • Add Windows-specific bazelrc configurations
  • Update MODULE.bazel with Windows toolchain support

@agluszak agluszak force-pushed the windows-ci branch 2 times, most recently from f43b6d5 to fca7208 Compare January 5, 2026 22:07
This change enables Windows builds and tests in the CI pipeline and fixes
various Windows compatibility issues throughout the codebase.

Platform-specific path handling:
- Replace /dev/null with ctx.actions.declare_file for null outputs on Windows
- Use platform-appropriate path separators in classpath construction
- Fix bzlmod classpath resolution for Kotlin compiler on Windows

Ktlint fixes:
- Simplify ktlint_fix and ktlint_test implementations
- Use proper argument files instead of shell-specific constructs
- Remove windows.bzl utility in favor of inline platform checks

Test infrastructure:
- Convert integration test runner to java_binary for cross-platform support
- Fix temporary file handling in tests for Windows compatibility
- Update test assertions to handle platform-specific path formats

CI configuration:
- Enable Windows builds in presubmit.yml
- Add Windows-specific bazelrc configurations
- Update MODULE.bazel with Windows toolchain support
executable_name = executable_name + ".exe"
return ctx.actions.declare_file(executable_name)

def _create_windows_exe_launcher(ctx, executable, java_executable, classpath, main_class, jvm_flags_for_launcher, runfiles_enabled, coverage_main_class = None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup

@agluszak agluszak marked this pull request as ready for review January 9, 2026 12:18
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.

2 participants