Interacting with flakes fails in directories with non-ASCII UTF-8 characters #562

Closed
opened 2024-10-30 15:34:56 +00:00 by milibopp · 3 comments

Describe the bug

When I run flake-related operations in a directory that has special characters anywhere in its path, Lix fails to properly encode those to Git, apparently escaping them improperly.

Steps To Reproduce

  1. Make a directory with special characters in its name, for example "äöü"
  2. Clone or initialize a git-based flake directory inside (e.g. git init && nix flake init)
  3. Run any flake-interacting command on it (e.g. nix build)
  4. See error (for example, see attached log)

Expected behavior

I can interact with the flake like usual.

nix --version output

nix (Lix, like Nix) 2.91.1

Additional context

None.

## Describe the bug When I run flake-related operations in a directory that has special characters anywhere in its path, Lix fails to properly encode those to Git, apparently escaping them improperly. ## Steps To Reproduce 1. Make a directory with special characters in its name, for example "äöü" 2. Clone or initialize a git-based flake directory inside (e.g. `git init && nix flake init`) 3. Run any flake-interacting command on it (e.g. `nix build`) 4. See error (for example, see attached log) ## Expected behavior I can interact with the flake like usual. ## `nix --version` output `nix (Lix, like Nix) 2.91.1` ## Additional context None.
854 B
milibopp added the
bug
label 2024-10-30 15:34:56 +00:00
jade added the
Area/flakes
label 2024-11-10 02:36:44 +00:00
Owner

oh. i know why this happens. it's because the stuff gets urlencoded because of the overall abuses of URLs in flakes and fetchTree. that's rather horrifying nonetheless and it should be fixed.

oh. i know why this happens. it's because the stuff gets urlencoded because of the overall abuses of URLs in flakes and fetchTree. that's rather horrifying nonetheless and it should be fixed.
Author

This seems easy enough to try to fix this myself actually. So perhaps I'll give it a go.

This seems easy enough to try to fix this myself actually. So perhaps I'll give it a go.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2173 ("libutil: fix non-ASCII chars in URL encoding")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2173", "number": 2173, "kind": "commit message"}], "cl_meta": {"2173": {"change_title": "libutil: fix non-ASCII chars in URL encoding"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2173](https://gerrit.lix.systems/c/lix/+/2173) ("libutil: fix non-ASCII chars in URL encoding")
milibopp changed title from Interacting with flakes fails in directories with special characters to Interacting with flakes fails in directories with non-ASCII UTF-8 characters 2024-11-11 13:33:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#562
No description provided.