From b8f4a4e40dc244d06030ef8644bc6788e9b8df93 Mon Sep 17 00:00:00 2001 From: hasheddan Date: Sat, 8 Aug 2020 08:37:15 -0500 Subject: [PATCH] internal/lsp/protocol/typescript: clean up type gen documentation Updates wording in lsp protocol type generation documentation regarding anonymous struct types for formal parameters. Change-Id: Icd78545c0f8b3d78d41ab6eb95dac2bc381dcc1c Reviewed-on: https://go-review.googlesource.com/c/tools/+/247520 Reviewed-by: Rebecca Stambler --- internal/lsp/protocol/typescript/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lsp/protocol/typescript/README.md b/internal/lsp/protocol/typescript/README.md index 7cae9514ac..478004556c 100644 --- a/internal/lsp/protocol/typescript/README.md +++ b/internal/lsp/protocol/typescript/README.md @@ -27,7 +27,7 @@ containing type definitions, and `tsserver.go`, `tsclient.go` containing API stu the generated files and stored in the variable `gitHash` in `go.ts`. It is checked (see `git()` in `util.ts`) on every execution. 3. Generating the `ts*.go` files is only semi-automated. Please file an issue if the released version is too far behind. 4. For the impatient, first change `gitHash` by hand (`git()` shows how to find the hash). - 1. Then try to run `code.ts`. This will likely fail because the heuristics don't cover some new case. For instance, some simple type like `string` might have changed to a union type `string | [number,number]`. Another example is that some formal parameter generated by will have anonymous structure type, which is essentially unusable. + 1. Then try to run `code.ts`. This will likely fail because the heuristics don't cover some new case. For instance, some simple type like `string` might have changed to a union type `string | [number,number]`. Another example is that some generated formal parameter may have anonymous structure type, which is essentially unusable. 2. Next step is to move the generated code to `internal/lsp/protocol` and try to build `gopls` and its tests. This will likely fail because types have changed. Generally the fixes are fairly easy. Then run all the tests. 3. Since there are not adequate integration tests, the next step is to run `gopls`.