Hackathon project proof-of-concept for a x plat Go language service. Now abandoned.
- Visual Studio 2019 16.1 for Windows
- Visual Studio 2019 8.2.0 Preview for Mac
- Language service smarts are written in Go, using the token, parser, and types libraries from the Go standard library to lex, parse, and type check the code.
- Editor features talk to this language service through a thin inteop layer built using a a combination of PInvoke and a cgo c-shared library with C language bindings for Go.
Screenshots are from an earlier build which was a full, from-scratch language service for Go in C#. Since then, I have changed strategies to enable reuse of existing Go libraries.
We're starting at square one. The code seen here is a series of hacks meant to set the context.
- Currently using TextMate for colorization and outlining and structure. Ideally we'll move this to using the Go AST or tokens.
- Error squiggles are directly output by the go/parser and go/types libraries as a result of parsing and type checking the code.
- Install the Go development SDK.
- Install gofmt and gogetdoc.
- Build in Visual Studio 2019 16.1+.
- Copy src/test-fodder to your GOPATH directory.
- Open the file in the experimental VS instance.
- Install Visual Studio 2019 16.1
- Install Go SDK (expects C:\Go)
- Install MinGW32 GCC C/C++ compiler for Windows (expects C:\MinGW)
- Open Go.Windows.sln, rebuild and start 'Visual Studio Extension'
- Install VS for Mac 8.2 Preview
- Install Go SDK
- Install XCode/Apple developer tools (needed for gcc).
- C# code is best debugged from Visual Studio.
- It's recommended that you debug Go Code by:
- Open the root of the repo in VS Code as a folder view
- Install the Go Extension for VS Code
- Test changes using the debugger in VS Code against the 'testapp.go' file.
- Native Go interop layer can only be debugged via GCC, so it's recommended that you minimize additions to this layer.
Contributions and discussion are absolutely welcome :)