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

please_go get crashes #308

Closed
timburks opened this issue Nov 26, 2024 · 0 comments
Closed

please_go get crashes #308

timburks opened this issue Nov 26, 2024 · 0 comments

Comments

@timburks
Copy link
Contributor

$ please_go get
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77d1e8]

goroutine 1 [running]:
main.main()
	/home/tim/Desktop/go-rules/tools/please_go/please_go.go:222 +0x68

I just stumbled onto this when doing a codelab, (see thought-machine/please#3303), and believe this crash is occurring because #306 removed the "get" handler but left this struct in place. When I remove the struct, I get a helpful error message:

$ please_go get
please-go is used by the go build rules to compile and test go modules and packages.

Unlike 'go build', this tool doesn't rely on the go path or modules to find packages. Instead it takes in
a go import config just like 'go tool compile/link -importcfg'.

Usage:
  please_go [OPTIONS] <command>

Help Options:
  -h, --help  Show this help message

Available commands:
  cover                    Generates coverage information for a package.
  embed                    Generate embed config for a set of Go source files (aliases: e)
  filter                   Filter go sources based on the go build tag rules. (aliases: f)
  generate                 Generate build targets for a Go module (aliases: g)
  generate_module_version  Generates a module version file for a third-party Go module
  install                  Compile a go module similarly to 'go install' (aliases: i)
  modinfo                  Generates Go modinfo for the linter
  module_info              Creates an info file about a series of packages in a go_module (aliases: m)
  package_info             Creates an info file about a Go package (aliases: p)
  testmain                 Generates a go main package to run the tests in a package. (aliases: t)

Unknown command `get'. Please specify one command of: cover, embed, filter, generate, generate_module_version, install, modinfo, module_info, package_info or testmain
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

No branches or pull requests

2 participants