Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.68 KB

CONTRIBUTING.md

File metadata and controls

59 lines (39 loc) · 2.68 KB

Contributing to this Extension

For feature requests or questions on how to use this extension, visit the #flux channel in our community slack.

Bug Reports

Before filing an issue, please ensure that you are running the most recent version of the extension and then search existing issues to see if the problem has already been reported.

If the issue does not already exist, create an issue that includes instructions on how to reproduce the bug.

Contributing to the Source Code

Signing the CLA

In order to contribute to this project, you must sign the InfluxData Contributor License Agreement (CLA).

Building in Debug Mode

VSCode has an extension development mode that can be used for developing and debugging the extension.

  1. git clone https://github.com/influxdata/vsflux
  2. cd vsflux
  3. npm install to install dependencies
  4. code . to open the project in VSCode

Press F5 within the editor. This will open a new VSCode window titled Extension Development Host. From here, open any folder with flux code.

The Extension Development Host window can be reloaded with cmd-r to pick up new changes to the editor.

Additionally, breakpoints can be added to the extension and will be triggered if executed by the plugin running in Extension Development Host.

Sideloading the Extension

The extension can be sideloaded to test it end to end, instead of running in debug mode.

  1. git clone https://github.com/influxdata/vsflux (if not already done)
  2. npm install to install dependencies
  3. npm install -g vsce to globally install the extension manager CLI tool
  4. vsce package to build the package. This will generate a file ending with .vsix
  5. In the command palette, run Extensions: Install from VSIX... and choose the vsix file that you generated.

Running a Local Language Server Build

If you'd like to build the language server locally and run it against the VSCode extension:

Requirements:

  • Docker
  • Node (> 12)
  • Rust (> 1.40)
  1. Clone the following repos
  • github.com/influxdata/vsflux
  • github.com/influxdata/flux-lsp
  1. CD into the flux-lsp repo and run ./wasm-build.sh (requires docker).
    • Optional: if you haven't installed wasm-pack, wasm-strip, and wasm-opt, run cargo install wasm-pack && brew install wabt && brew install binaryen
  2. CD into the vsflux repo and update package.json and change the dependency of @influxdata/flux-lsp-node to <full path to flux-lsp>/target/pkg-node
  3. run npm install
  4. Open vsflux in vscode and run (F5)