I'm responsible for some of that code but other than that, I'm just giving my personal opinion. There's no fundamental reason it couldn't be public, but, 1. They change all the time (weekly for some of it, more slowly for tsprotocol.go, which follows the Microsoft code) 2. They are adapted to the repository's version of gopls, and changes in gopls cause changes in these files.
One way to try things out is to clone the repository, and then in master, add your own git project. It has access to the internal files, but you'd push and pull it independently. That doesn't solve your problem, but maybe it delays it. On Sat, Jul 13, 2019 at 7:43 AM <arno...@gmail.com> wrote: > Hi there, > > I am trying to write a Go client for gopls. Ideally I would like to be > able to to import a package that defines Go types for all the messages that > can be sent to / received from the server, which is something that > obviously the gopls server also has to do. Unfortunately the protocol > files are not in a public package ( > https://github.com/golang/tools/tree/master/internal/lsp/protocol > <https://github.com/golang/tools/tree/master/internal/lsp/protocol/typescript>). > There are instructions to generate the Go files at > https://github.com/golang/tools/blob/master/internal/lsp/protocol/typescript/README.md > but > they require some files from that repository so that is not very useful. > > Would it make sense for this to be extracted as a public package? If so, > how would I go about achieving this? If not, what would be a sensible > approach for me? > > Regards, > > Arnaud Delobelle > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/8fdc691a-345a-4162-a6cf-2e9b5cb078ec%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/8fdc691a-345a-4162-a6cf-2e9b5cb078ec%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOUkXSqVC07hpiPty3Yvi3g79itOWfg%2Br2Oz96NztDA10%2BLbTA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.