Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 2.3 KB

File metadata and controls

88 lines (62 loc) · 2.3 KB

Developer Documentation

Debug CLI

Note

The version of the built tombi command is 0.0.0-dev. If you want to execute a specific version, please refer to the Installation Document.

Use Cargo

cargo tombi

Use Python

# Setup Python Environment
uv sync
source .venv/bin/activate

# Build and Run
maturin dev --uv && tombi

Debug VSCode Extension

  1. Select Run and Debug from the sidebar
  2. Select Run Extension (Debug Build) from the dropdown
  3. Press the green play button ▶️

Working on the IntelliJ plugin

To get started, open the editors/intellij subdirectory in IntelliJ IDEA, then configure Gradle.

When a pull request is opened, the plugin will be built automatically. The plugin artifact can then be downloaded from the corresponding workflow run.

Building the IntelliJ plugin

$ cd editors/intellij
$ ./gradlew buildPlugin

Running the IntelliJ plugin tests

$ cd editors/intellij
$ ./gradlew check

IntelliJ plugin development resources

Build Tombi JSON Schemas

cargo xtask codegen jsonschema

Rust tests

The easiest way to test a specific test case is to run the code action of the specific test case with VSCode Rust Analyzer.

When running with Cargo nextest, run RUST_LOG=trace cargo nextest run -- $TEST_NAME to output detailed logs.

toml-test

To test if it passes toml-test, run the following.

# Please first install toml-test
go install github.com/toml-lang/toml-test/v2/cmd/toml-test@latest

# Run the toml-test
cargo xtask toml-test

Check Performance

cargo tombi-flamegraph format
# Open the flamegraph in a browser or using a platform-specific command:
# macOS: open .tmp/flamegraph.svg
# Linux: xdg-open .tmp/flamegraph.svg
# Alternatively, manually open the file in your web browser.