thought-machine / please

High-performance extensible build system for reproducible multi-language builds.
https://please.build
Apache License 2.0
2.48k stars 207 forks source link

Crash in Getting Started with Go codelab, step 9 (Adding third-party dependencies) #3303

Open timburks opened 3 days ago

timburks commented 3 days ago

After following the instructions in steps 1-8, on step 9 I encountered a crash:

$  plz run ///go//tools/please_go -- get github.com/stretchr/testify@v1.8.2
Building [0/1, 0.0s]:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77d1c8]

goroutine 1 [running]:
main.main()
    tools/please_go/please_go.go:222 +0x68

I've seen this on two different systems, both running Ubuntu 24.10.

$ plz --version
Please version 17.12.5

Continuing the codelab with the go_repo statements in the instructions works fine -- the problem is just in getting the dependencies with please_go -- get.

timburks commented 2 days ago

After seeing the deletion in please_go, I tried using puku fmt and got good results. I guess this is what the codelab should be suggesting now. The existing text is:

"To add third party dependencies to Please, the easiest way is to use ///go//tools:please_go to resolve them, and then add them to third_party/go/BUILD. Let's add github.com/stretchr/testify:"