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

Fix symlink builder to recursively walk the vendor directory #121

Merged
merged 2 commits into from
May 30, 2024

Conversation

ghost
Copy link

@ghost ghost commented Aug 16, 2023

Fixes #20

If the new Println is deemed unnecessary, I can remove it.

@JoshVanL
Copy link

Friendly bump on this PR. I also ran into this issue which this PR fixes.

@olebedev
Copy link

olebedev commented Oct 4, 2023

I am running into that issue as well.

@dbaynard
Copy link

@niklashhh while we await a maintainer, I too wish to use your branch. Would you please rebase onto master?

@dbaynard
Copy link

Can confirm too this fixes the issue (I rebased on my own fork). Also kudos on replacing a todo block with a single function that does the right thing — it's nice to see some care taken in this sort of thing.

@adisbladis you are listed as the maintainer; would you please arrange for a review?

@ghost
Copy link
Author

ghost commented Oct 31, 2023

@dbaynard Thanks for the kind words!

I have updated the branch. Have not tested that everything works as expected though, so please verify before merging!

@elliottneilclark
Copy link

This is now needed to build AWS SDK v2 (specifically SSO service). Without it, you get an error:

       > vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go:12:2: cannot find module providing package github.com/aws/aws-sdk-go-v2/internal/endpoints: import lookup disabled by -mod=vendor
       > vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go:13:2: cannot find module providing package github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn: import lookup disabled by -mod=vendor

Another clue is that go build works but building in nix fails.

I then changed to https://github.com/batteries-included/gomod2nix/commit/9febec02ae10d88d0bebb7ef3fe1c06f35c98c5d and builds succeeded in nix again.

@isubasinghe
Copy link

@Mic92 could you please review/merge this?

@Mic92 Mic92 merged commit 31b6d2e into nix-community:master May 30, 2024
1 check passed
@Mic92
Copy link
Member

Mic92 commented May 30, 2024

@isubasinghe I don't have the capacity to maintain this and I am not using gomod2nix anywhere.
So here we should really identify a new maintainer.

@isubasinghe
Copy link

Okay thanks @Mic92 for the update

@bennofs
Copy link

bennofs commented Jul 17, 2024

This patch causes the following panic for discourse_distrust (a go app I am using in my deployment):

symlink error, trying /nix/store/wqn056sx2amxf3qx2x5j695x6ggxb3wb-go_v1.1.4/codec symlink /nix/store/wqn056sx2amxf3qx2x5j695x6ggxb3wb->
symlink error, trying /nix/store/wqn056sx2amxf3qx2x5j695x6ggxb3wb-go_v1.1.4/codec/0_importpath.go symlink /nix/store/wqn056sx2amxf3qx2>
panic: readdirent /nix/store/wqn056sx2amxf3qx2x5j695x6ggxb3wb-go_v1.1.4/codec/0_importpath.go: not a directory

goroutine 1 [running]:
main.populateVendorPath({0xc00017d440, 0x31}, {0xc000181d60, 0x4b})
        /nix/store/ji20l57yzb60rsy2n1v5j06cpars16db-symlink.go:87 +0x285
main.populateVendorPath({0xc000182d50, 0x21}, {0xc00017d380, 0x3b})
        /nix/store/ji20l57yzb60rsy2n1v5j06cpars16db-symlink.go:95 +0x265
main.populateVendorPath({0xc00016b460, 0x1b}, {0xc0000f76c0, 0x35})
        /nix/store/ji20l57yzb60rsy2n1v5j06cpars16db-symlink.go:95 +0x265
main.makeSymlinks({0xc000152000, 0xc00013b0c8?, 0x1ab?}, 0xc000092020?)
        /nix/store/ji20l57yzb60rsy2n1v5j06cpars16db-symlink.go:71 +0x1e5
main.main()
        /nix/store/ji20l57yzb60rsy2n1v5j06cpars16db-symlink.go:52 +0x279

I have no idea how any of this works, will debug further later

dbaynard added a commit to fore-stun/flakes that referenced this pull request Oct 13, 2024
The recursive symlinker fix has been merged.

Fix symlink builder to recursively walk the vendor directory by niklashhh
· Pull Request #121 · nix-community/gomod2nix
nix-community/gomod2nix#121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find package "." in
8 participants