Skip to content

rrmcguinness/vscode-bazel-tutorial

Repository files navigation

Visual Studio Code - Bazel Workspace

TL;DR;

This repository contains an example project that uses Protocol Buffers (protobuf) to create a domain model and services. There are two example implementations, one in Go, the other in Java. The functionality is stubbed out, but shows how to build a multiple language project using Bazel. Lastly, it ties it all together with a predefined workspace and task to make it repeatable.

Overview

What this IS NOT

This repository IS NOT a general purpose tutorial for how to use Bazel, Visual Studio Code, Java, or Go. It is intended for those who want their IDE to work with a mono-repo / multi-project build system. That being said, I've attempted to add a README in each module to explain how it was built.

Documentation Site

Documentation

Prerequisites

Once Bazel is installed, make sure you can execute bazel help from the terminal.

Verified

  • ✅ Linux (Ubuntu / Linux Mint)
  • ✅ Mac OS X
  • ✅ Windows 10 with Windows Subsystem for Linux (WSL)
  • ✅ Chrome OS (Version 105+) with Developer Linux Tools
  • ❌ Windows 10 Native - Not working due to path requirements.
  • ✅ Java Language Server and Auto Complete
  • 🔶 - Go Language Server and Auto Complete

Known Issues

  • ‼️ Many of the language tools require fixed, non-relative, non-expanding paths to toolsets. This is painful when your build tool can construct the tool-chain.
  • ❗ Gopls Server and Protobufs not honoring the $GOBIN variable, nor have I found a setting to add it to the server.

Setup

Build

About

An example project demonstrating how to configure Bazel with VSCode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published