Provide guarantees about portable path ordering
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- documentation, operating-systems, testing
Research direction
No file or test is named in the issue. Start by locating the path ordering or comparison entry point and existing path-ordering tests; then determine how directory separators are compared across operating systems. Done means the ordering guarantee is documented and covered by tests for separator-containing relative paths.
Written by the indexing model from the issue text.
Description
In other ecosystems (e.g. Java), I was once surprised by the following behavior.
Say you have a list of relative paths (legally distinguishable on multiple operating systems, i.e. they don't have case conflicts and mix-ups), and you sort them.
In Java, there's no guarantee you'll have the same order on all operating systems, because / and \ have different sort order, and even if you have the same path letters, you'll have different order — say, items ["a/a", "a-a", "a.a"] vs ["a-a", "a.a", @"a\a"] might be sorted differently.
A particular problem I've had with this:
> listOf(
java.nio.file.Path.of("commons"),
java.nio.file.Path.of("com/x")
).sortedBy { it }
// => [commons, com\x]
> listOf(
"commons",
"com/x"
).sortedBy { it }
// => [com/x, commons]
TruePath should guarantee the same ordering for items involving directory separators (i.e. the directory separator should have the same ordering on all the operating systems), document this and cover by tests, of course.
- Dominant language
- C#
- Stars
- 104
- Forks
- 19
- Avg merge
- 13h 42m
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ForNeVeR/TruePath
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Dependency Dashboard Opendashboard
Difficulty 3/5 1-2 days Newbie friendliness 15/100
All issues in ForNeVeR/TruePath
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cake-build/cake#5024 ·
-
Frontend status/draft TechnicalDebt
Difficulty 2/5 1-2 days Newbie friendliness 75/100
Altinn/altinn-auth#4143 ·