nix-community / vgo2nix

Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files [maintainer=@adisbladis]
MIT License
90 stars 21 forks source link

fatal: empty string is not a valid pathspec #48

Closed Profpatsch closed 3 years ago

Profpatsch commented 3 years ago

Running vgo2nix-unstable-2020-11-07 on a checkout of https://github.com/muesli/beehive:

panic: Error processing import path "github.com/blend/go-sdk": nix-prefetch-git --fetch-submodules --no-deepClone --url https://github.com/blend/go-sdk --rev v2.0.0 failed:
Initialized empty Git repository in /run/user/1000/git-checkout-tmp-zexHif5M/go-sdk/.git/
fatal: couldn't find remote ref refs/tags/v2.0.0
From https://github.com/blend/go-sdk
 * [new branch]      albert/db-exports       -> origin/albert/db-exports
 * [new branch]      dhermes/CODEOWNERS      -> origin/dhermes/CODEOWNERS
 * [new branch]      dhermes/update-db       -> origin/dhermes/update-db
 * [new branch]      golang.blend.com        -> origin/golang.blend.com
 * [new branch]      legacy-master           -> origin/legacy-master
 * [new branch]      legacy-v1.0             -> origin/legacy-v1.0
 * [new branch]      legacy-v2.0             -> origin/legacy-v2.0
 * [new branch]      legacy-v3.0             -> origin/legacy-v3.0
 * [new branch]      master                  -> origin/master
 * [new branch]      mat285-patch-1          -> origin/mat285-patch-1
 * [new branch]      mikes-blend/db-cleaner-query-out -> origin/mikes-blend/db-cleaner-query-out
 * [new branch]      mikes-blend/fix-constraint-guard-func -> origin/mikes-blend/fix-constraint-guard-func
 * [new branch]      mikes-blend/fix-transit-key-create -> origin/mikes-blend/fix-transit-key-create
 * [new branch]      mikes-blend/guards-and-schemas -> origin/mikes-blend/guards-and-schemas
 * [new branch]      mikes-blend/schema-search-path -> origin/mikes-blend/schema-search-path
 * [new branch]      mikes/migration-options -> origin/mikes/migration-options
 * [new branch]      mikes/nested-tx         -> origin/mikes/nested-tx
 * [new branch]      mikes/parse-dsn-no-dbname -> origin/mikes/parse-dsn-no-dbname
 * [new branch]      mikes/secrets-changes   -> origin/mikes/secrets-changes
 * [new branch]      wcharczuk/async-tweaks  -> origin/wcharczuk/async-tweaks
 * [new branch]      wcharczuk/breaker       -> origin/wcharczuk/breaker
 * [new branch]      wcharczuk/cache         -> origin/wcharczuk/cache
 * [new branch]      wcharczuk/error-filters -> origin/wcharczuk/error-filters
 * [new branch]      wcharczuk/follow-ons    -> origin/wcharczuk/follow-ons
 * [new branch]      wcharczuk/selector      -> origin/wcharczuk/selector
 * [new branch]      wcharczuk/sentry-client -> origin/wcharczuk/sentry-client
 * [new branch]      will/export             -> origin/will/export
 * [new tag]         legacy-v0.1.0           -> legacy-v0.1.0
 * [new tag]         legacy-v0.2.0           -> legacy-v0.2.0
 * [new tag]         legacy-v0.3.0           -> legacy-v0.3.0
 * [new tag]         legacy-v0.3.1           -> legacy-v0.3.1
 * [new tag]         legacy-v0.3.2           -> legacy-v0.3.2
 * [new tag]         legacy-v0.3.3           -> legacy-v0.3.3
 * [new tag]         legacy-v0.3.4           -> legacy-v0.3.4
 * [new tag]         legacy-v0.3.5           -> legacy-v0.3.5
 * [new tag]         legacy-v1.0.0           -> legacy-v1.0.0
 * [new tag]         legacy-v1.0.1           -> legacy-v1.0.1
 * [new tag]         legacy-v1.1.0           -> legacy-v1.1.0
 * [new tag]         legacy-v1.1.1           -> legacy-v1.1.1
 * [new tag]         legacy-v2.0.0           -> legacy-v2.0.0
 * [new tag]         legacy-v3.0.0           -> legacy-v3.0.0
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
Unable to checkout refs/tags/v2.0.0 from https://github.com/blend/go-sdk.

goroutine 1 [running]:
main.main()
    /build/source/main.go:291 +0x713

this might be a transitive problem with nix-prefetch-git, I haven’t investigated.

Profpatsch commented 3 years ago

Okay, so it turns out that

fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths

is completely misleading and that everything in this whole stack is broken beyond belief and I want to burn it all.

The branch does not exist, because the go.sum contains a branch v2.0.0, because somebody in the go modules team thought it was a good idea to use branches for lockfiles, and of course one of the 200 million dependencies would rename their branches to legacy-v2.0.0, partly because nobody expects that people depend on a tag for pinning versions.

Profpatsch commented 3 years ago

I don’t even, I think we can close this here.