-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR allows ```scala val p: os.Path = "/hello/world" val s: os.SubPath = "hello/world" val r: os.RelPath = "../hello/world" ``` This only allows string-literals that are valid absolute/sub/relative-path respectively; passing in invalid paths (e.g. `val p: os.Path = "hello/world"`) or non-literals (e.g. `val str = "/hello/world"; val s: os.SubPath = str `) is a compile error This builds upon @pawelsadlo's work in #297, mostly using `segmentsFromStringLiteralValidation` unchanged with some light pre/post processing to trim the leading `/` off of absolute `os.Path`s and check for leading `..`s on `os.SubPath`s I'm going to declare bankruptcy on the Expecty issues, as we cannot forever be working around bugs in unrelated libraries. If someone has problems and wants to fix expecty, they can do so, and we don't need to care. If nobody cares enough to fix expecty, we shouldn't care either.
- Loading branch information
Showing
7 changed files
with
155 additions
and
43 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
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 was deleted.
Oops, something went wrong.
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