DSO compatibility on windows#156
Draft
DSchreyer wants to merge 11 commits into
Draft
Conversation
added 3 commits
August 26, 2025 15:31
* 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
Collaborator
Author
|
Let's wait and see which CI fails |
Collaborator
Author
|
Even though most checks pass, get-config does not work and I am unsure about the watermarking feature. I need to further investigate |
Collaborator
Author
|
|
Collaborator
Author
|
Yeah, despite passing all errors there are issues now with this version on linux. |
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
This PR improves Windows compatibility while preserving POSIX behavior (#152):
dso compile-confignow emits backslashes for!pathentries inparams.yamlon Windows, and forward slashes on POSIX.DSO_TEMPLATE_LIBRARIESsupports absolute Windows paths with drive letters (no accidental split onC:).pre-commitchecks.find_in_parentno longer recurses past Windows drive/UNC roots.Rationale
Windows users encountered:
params.yamlusing forward slashes.pre-commitfailures due to mixed line endings in generated files.RecursionErrorwhen searching above drive roots.DSO_TEMPLATE_LIBRARIES.Changes
src/dso/_compile_config.pyNormalize compiled
!pathstrings to OS-native separators for both relative and absolute cases.src/dso/_templates.pyDSO_TEMPLATE_LIBRARIESthat toleratesX:\...entries._copy_with_renderwrites files withencoding="utf-8", LF newlines, and a trailing newline.src/dso/_util.pyRobust root detection in
_find_in_parent_abs: stops at drive/UNC roots; safe recurse barrier checks.tests/test_compile_config.pyupdated to normalize expectations withos.path.normpathand use UTF-8 I/O./.Backward Compatibility
params.yamlnow contains backslashes for compiled!pathentries. 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.