Thank you both for your help. Looks like I will have to hack it somehow for the time being!
On Saturday, 13 July 2019 18:48:17 UTC+1, Paul Jolly wrote: > > Just to add to Peter's response. > > The issue tracking making these packages non-internal is > https://github.com/golang/go/issues/31080 > > FWIW, a number of people (myself included) simply clone the internal > packages for our own purposes. Here are those packages cloned, with > import paths changed: > > https://github.com/myitcv/govim/tree/master/cmd/govim/internal > > And here is the hacky script I used to clone those packages: > > > https://github.com/myitcv/govim/blob/master/_scripts/revendorToolsInternal.sh > > Also, you may be interested in golang tools > (https://github.com/golang/go/wiki/golang-tools). There is a good > amount of discussion about this sort of thing in those various > channels > > > Paul > > On Sat, 13 Jul 2019 at 16:05, 'Peter Weinberger (温博格)' via golang-nuts > <golan...@googlegroups.com <javascript:>> wrote: > > > > 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 <arn...@gmail.com <javascript:>> 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). 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 golan...@googlegroups.com <javascript:>. > >> To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/8fdc691a-345a-4162-a6cf-2e9b5cb078ec%40googlegroups.com. > > > >> 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 golan...@googlegroups.com <javascript:>. > > 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. > -- 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/ea47035f-b488-4b72-8a9a-9fa93aa78fe4%40googlegroups.com.