Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libgit2 based fetchGit cannot clone libsass on macOS #10116

Open
pilif opened this issue Feb 29, 2024 · 0 comments
Open

libgit2 based fetchGit cannot clone libsass on macOS #10116

pilif opened this issue Feb 29, 2024 · 0 comments
Labels
bug fetching Networking with the outside (non-Nix) world, input locking

Comments

@pilif
Copy link

pilif commented Feb 29, 2024

Describe the bug

libsass has had a commit happen to it that names two directories with different names which are normalized to the same name on macOS which does Unicode normalization on file names.

The PR to libsass was is https://github.com/sass/libsass/pull/2855/files and judging by the also included appveyor.xml I think the two names were not intentional.

Never the less: When libgit is cloning the repo, it behaves differently from git command line.

  • git CLI doesn't check whether a directory exists when cloning and thus the working copy ends up with one directory named after whatever macOS normalizes the names to (I don't think this is good behavior, but here we are)
  • libgit seems to check the file system before writing and then, after writing the first directory (after it has been normalized), will find the directory already existing when the second directory is normalized the same way.

Steps To Reproduce

builtins.fetchGit {
    url = "https://github.com/sass/libsass";
    rev = "4d229af5500be1023883c38c4a675f0ed919839d";
  }

Expected behavior

  • the clone is created and the revision is checked out.

Actual behavior

error: creating directory '/nix/store/663air9nqm8jp16n6dw8f8mxwv8w3jiw-source/lib/libsass/test/e2e/unicode-pwd/Sáss-UŢF8': File exists

nix-env --version output

nix-env (Nix) 2.20.3

Additional context

In nix 2.19.3 this is still fine probably because that was before #9240 was merged.

@pilif pilif added the bug label Feb 29, 2024
@pilif pilif changed the title libgit2 based fetchGit cannot clone out libsass on macOS libgit2 based fetchGit cannot clone libsass on macOS Feb 29, 2024
@roberth roberth added the fetching Networking with the outside (non-Nix) world, input locking label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fetching Networking with the outside (non-Nix) world, input locking
Projects
None yet
Development

No branches or pull requests

2 participants