Skip to content

Case-hacked files are observable from the language #9319

@roberth

Description

@roberth

Describe the bug

Whether the current store (or configuration (#9318)) enables the case hack should not affect the language.
Nix tries to support case sensitivity as much as possible, including allowing case sensitive paths to be represented in the store. This does not need to be detectable and arguably should not be detectable.

Steps To Reproduce

One a store (or machine (#9318)) that has the case hack, run nix repl

> :lf nixpkgs
> builtins.readDir (legacyPackages.aarch64-linux.ncurses + "/share/terminfo")  
{ "1" = "directory"; "2" = "directory"; "3" = "directory"; "4" = "directory"; "5" = "directory"; "6" = "directory"; "7" = "directory"; "8" = "directory"; "9" = "directory"; A = "directory"; E = "directory"; L = "directory"; M = "directory"; N = "directory"; P = "directory"; Q = "directory"; X = "directory";
  "a~nix~case~hack~1" = "directory"; b = "directory"; c = "directory"; d = "directory"; "e~nix~case~hack~1" = "directory"; f = "directory"; g = "directory"; h = "directory"; i = "directory"; j = "directory"; k = "directory"; "l~nix~case~hack~1" = "directory"; "m~nix~case~hack~1" = "directory";
  "n~nix~case~hack~1" = "directory"; o = "directory"; "p~nix~case~hack~1" = "directory"; "q~nix~case~hack~1" = "directory"; r = "directory"; s = "directory"; t = "directory"; u = "directory"; v = "directory"; w = "directory"; "x~nix~case~hack~1" = "directory"; z = "directory"; }

Expected behavior

The language uses a file system accessor that unapplies the case hack on trees that implement case sensitivity using the case hack.

nix-env --version output

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcstoreIssues and pull requests concerning the Nix store

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions