-
Notifications
You must be signed in to change notification settings - Fork 2
DSO compatibility on windows #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* Added: windows-aware parsing of dso_template libraries * Changed: Windows path behaviour with backslashes in params.yaml * Changed: Test expectations to fit new windows compatibility
Let's wait and see which CI fails |
Even though most checks pass, get-config does not work and I am unsure about the watermarking feature. I need to further investigate |
|
Yeah, despite passing all errors there are issues now with this version on linux. |
Summary
This PR improves Windows compatibility while preserving POSIX behavior (#152):
dso compile-config
now emits backslashes for!path
entries inparams.yaml
on Windows, and forward slashes on POSIX.DSO_TEMPLATE_LIBRARIES
supports absolute Windows paths with drive letters (no accidental split onC:
).pre-commit
checks.find_in_parent
no longer recurses past Windows drive/UNC roots.Rationale
Windows users encountered:
params.yaml
using forward slashes.pre-commit
failures due to mixed line endings in generated files.RecursionError
when searching above drive roots.DSO_TEMPLATE_LIBRARIES
.Changes
src/dso/_compile_config.py
Normalize compiled
!path
strings to OS-native separators for both relative and absolute cases.src/dso/_templates.py
DSO_TEMPLATE_LIBRARIES
that toleratesX:\...
entries._copy_with_render
writes files withencoding="utf-8"
, LF newlines, and a trailing newline.src/dso/_util.py
Robust root detection in
_find_in_parent_abs
: stops at drive/UNC roots; safe recurse barrier checks.tests/test_compile_config.py
updated to normalize expectations withos.path.normpath
and use UTF-8 I/O./
.Backward Compatibility
params.yaml
now contains backslashes for compiled!path
entries. Most consumers already accept native separators; if custom tooling expects/
, normalize viapathlib
/os.path
.Testing
Disclaimer
Some changes have been suggested by GPT-5 and Github Copilot. Therefore, some code might not follow best-practices or can lead to issues in specific circumstances. All tests have been passed on windows, but now also need to be passed on linux.