打开了log level的debug
M-x toggle-debug-on-error
*tfls::stderr*
里的内容看得更多了
...
time="2021-06-21T14:24:31+08:00" level=info msg="Log Level is Debug: false"
e[36mINFOe[0m Server started
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x14af3fa]
goroutine 28 [running]:
github.com/hashicorp/terraform/configs.(*Module).appendFile(0xc000e7c600, 0x0, 0xc0006b65b8, 0x1101c9d, 0xc000042410)
/Users/user12/go/1.16.2/pkg/mod/github.com/hashicorp/[email protected]/configs/module.go:128 +0x3a
github.com/hashicorp/terraform/configs.NewModule(0xc000847d80, 0xa, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15)
/Users/user12/go/1.16.2/pkg/mod/github.com/hashicorp/[email protected]/configs/module.go:97 +0x1fa
github.com/juliosueiras/terraform-lsp/langserver.TextDocumentComplete(0x1e7d970, 0xc000bfcb10, 0xc000124000, 0x51, 0x10, 0x15, 0x1, 0x0, 0x0, 0x0, ...)
/Users/user12/terraform/terraform-lsp/langserver/complete.go:56 +0x48e
reflect.Value.call(0x1b75760, 0x1d10f58, 0x13, 0x1cbed0c, 0x4, 0xc000bfcdb0, 0x2, 0x2, 0xc000bfcdb0, 0x199, ...)
/Users/user12/.goenv/versions/1.16.2/src/reflect/value.go:476 +0x8e7
reflect.Value.Call(0x1b75760, 0x1d10f58, 0x13, 0xc000bfcdb0, 0x2, 0x2, 0x2, 0xc000bfcdb0, 0x1)
/Users/user12/.goenv/versions/1.16.2/src/reflect/value.go:337 +0xb9
github.com/creachadair/jrpc2/handler.newHandler.func7(0x1e7d970, 0xc000bfcb10, 0xc0002d0540, 0x1c38e60, 0xc000bfcb10, 0x1b87280, 0x246a8a0)
/Users/user12/go/1.16.2/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x1f4
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0000d23e0, 0x1e7d970, 0xc000bfcb10, 0xc0002d0540, 0x0, 0x0, 0x1e7d970, 0xc000bfcb10)
/Users/user12/go/1.16.2/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x44
github.com/creachadair/jrpc2.(*Server).invoke(0xc0001ec240, 0x1e7d8c8, 0xc0002d0580, 0x1e69b60, 0xc0000d23e0, 0xc0002d0540, 0x0, 0x0, 0x0, 0x0, ...)
/Users/user12/go/1.16.2/pkg/mod/github.com/creachadair/[email protected]/server.go:288 +0x175
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc000c0e814, 0xc0001ec240, 0xc000bdc420)
/Users/user12/go/1.16.2/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x91
created by github.com/creachadair/jrpc2.(*Server).dispatch
/Users/user12/go/1.16.2/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x137
Process tfls stderr finished
好像是兼容性问题:GitHub - hashicorp/terraform: Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
要求较高,起码可以在保存代码时格式化
谢谢指导。