Skip to content

Latest commit

 

History

History
47 lines (28 loc) · 2.58 KB

developing.md

File metadata and controls

47 lines (28 loc) · 2.58 KB

Building Malloy

Building the Malloy repo requires node.js, yarn, and a Java Runtime Environment (JRE 1.6 or higher, 1.8 recommended) installed on your system in order to build the Malloy project.

Alternatively, you can use nix to install these dependencies. To use nix, install it with curl -L https://nixos.org/nix/install | sh and then run nix-shell from the malloy/ directory. Nix is what CI uses to run builds.

The following will install dependencies for the entire set of packages and compile both the Malloy language and the VSCode extension.

yarn install
yarn package-extension

VS Code tips

We provide a task in VS Code (.vscode/tasks.json) to watch the entire Malloy repo for typscript changes - this allows VS Code to output typescript errors even when files are closed. The default behavior is for errors to only appear in open files. If you want the watcher task to compile all files in the background, you can either run the task manually (Command Palette -> Tasks -> Run Task -> tsc-compile-watch). If you want to enable this task to always start when you open the project, run Command Palette -> Tasks: Manage Automatic Tasks in Folder -> Allow Automatic Tasks in folder.

Malloy VSCode Extension

The Malloy VSCode extension's source is in the malloy-vscode directory.

Installation

To build and install the current version of the extension, first ensure that you've followed the steps to install the dependencies for the Malloy Repo. Note: You will need to re-run the below any time you pull in new changes. Then run:

yarn package-extension

Next, in VSCode EITHER:

  1. Run the "Extensions: Install from VSIX" command (CTRL/CMD + SHIFT + P opens the command interface), then select malloy/packages/malloy-vscode/dist/malloy-vscode-x.x.x.vsix

OR

  1. Open the malloy-vscode package root directory in VSCode, right click on dist/malloy-vscode-x.x.x.vsix and select "Install Extension VSIX".

Malloy and Extension Development

  1. Open the malloy directory in VSCode (where ever you cloned)
  2. Select the "Run and Debug" panel in the left bar.
  3. Click the green arrow "Run" button, with the "Run Extension" profile selected.

Optional: To additionally debug the language server, run the "Attach to Language Server" launch profile from the "Run and Debug" panel.

open_vsix3