Consider requiring unicode paths
- Dominant language
- Rust
- Stars
- 35.8k
- Forks
- 846
- Avg merge
- 27m
- Merged PRs (30d)
- 3
Description
Currently, just supports non-unicode paths.
This complicates a bunch of things:
- There are many errors related to converting paths to strings, either for display or manipulation, which can only occur because we support non-unicode paths.
- We have to call `.display()` whenever we want to display a string.
- Contributors often can't figure out, when writing new code that handles paths, in which cases converting a path to a string should be an error and in which cases it can be ignored.
- Just functions return strings as output, so any that do path manipulation fail on non-unicode paths.
- Globbing in imports is a desired feature but is complicated by the fact that globbing libraries don't support non-unicode paths.
I would love to switch to [camino](https://github.com/camino-rs/camino), a Unicode-only path library and remove support for non-unicode paths, which would allow dramatically simplifying all the path manipulation and display in the codebase, of which there is a great deal.
This is definitely a breaking change. However, non-unicode paths are, as I understand it, vanishingly uncommon, to the point that if we did not support them I'm not sure if anyone would notice. As long as the level of disruption is non-existent or very low, I think it would be reasonable to do this, even when we don't normally do breaking changes.
To try to figure out how disruptive this would be, I'm going to add a warning which prints out if the invocation directory or the path to a justfile is not unicode, requesting that users comment on this issue. If enough time passes with no comments or very few comments, we can go ahead and remove support for non-unicode paths.
The warning was added in PR https://github.com/casey/just/pull/3230. I'm not sure how long we should wait before assessing how much breakage there would be, but I think at least three months after a release, and possibly up to one year, would be reasonable.
Contributor guide
Assessment
This issue has not been assessed yet.