-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flag use of Unicode less-than and greater-than characters in FilePath…
… to be a Windows-only change (#215) This PR fixes a regression introduced by #208 That PR aimed to fix #200, an issue where `std.extVar` failed on Windows because it tried to resolve mock paths which contained `<` and `>` characters which are forbidden in Windows filenames. That PR's solution was to use Unicode less-than and greater-than characters in place of ASCII `<` and `>`, but that broke things for Unix/Linux platforms with a non-UTF8 `LANG` (see #208 (review)). In this PR, I aim to fix this by flagging the other PR's change to only occur for Windows, while continuing to use ASCII `<` and `>` as before on other platforms. I also added a regression test by pinning `LANG=C` in our GitHub Actions test setup. This successfully reproduced the bug fixed in this PR, and also uncovered a minor test-only issue related to the use of default character encodings (which I've fixed by pinning the test code to UTF-8). Note that these file paths aren't actually materialized onto disk: rather, these are "placeholder / mock" paths used to indicate when jsonnet is reading from synthetic paths. In theory, we might be able to avoid the need to ever perform resolution in the first place by changing uses of these paths to be an `Either` of either an actual `os.Path` or a placeholder, but that's a much larger and more invasive change than I want to make right now. Here, I've chosen to pursue a narrowly-targeted tactical fix-forward.
- Loading branch information
Showing
5 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
9 changes: 5 additions & 4 deletions
9
sjsonnet/test/src-jvm/sjsonnet/BufferedRandomAccessFileTests.scala
This file contains 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