Skip to content

Shallow fetching error in 2.35 #16212

Description

@roberth

Describe the bug

NixOS/flake-compat#95

With Nix 2.35.1, plain nix-build fails in shallow clones with the default flake-compat setup:

… while evaluating the attribute 'revCount'

… while calling the '__forceLazyFetcherAttr' builtin

error: '' is a shallow Git repository, so 'revCount' is not available
Selecting the package explicitly by nix-build -A default does succeed.

Steps To Reproduce

Get the revCount on an apparently shallow repo.

Expected behavior

2.34: apparently no error

If we misdiagnosed flake-compat#95 or if we were too lenient, a better error.

Metadata

Additional context

Originally reported by @bryango in NixOS/flake-compat#95

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions