Skip to content

Commit

Permalink
feat: Add testing infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
k3yss committed Dec 19, 2024
1 parent b347e07 commit 96c015c
Show file tree
Hide file tree
Showing 11 changed files with 665 additions and 63 deletions.
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ tokio = { version = "1.39.3", features = [
"sync",
"time",
"io-std",
"test-util",
"full",
] }
which = "6.0.0"
whoami = "1.5.1"
Expand All @@ -77,6 +79,8 @@ xdg = "2.5.2"
tower-lsp = "0.20.0"
tracing-appender = "0.2.3"
dashmap = "6.1.0"
fs_extra = "1.3.0"
temp-dir = "0.1.13"
# Using older version of tree-sitter due to tree-sitter-nix not being updated yet
tree-sitter = "0.20"
tree-sitter-nix = "0.0.1"
Expand Down
2 changes: 2 additions & 0 deletions devenv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ tracing-appender.workspace = true
dashmap.workspace = true
tree-sitter.workspace = true
tree-sitter-nix.workspace = true
fs_extra.workspace = true
temp-dir.workspace = true

[build-dependencies]
cc = "*"
5 changes: 3 additions & 2 deletions devenv/src/devenv.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{cli, cnix, config, log, lsp, tasks, utils};
use super::{cli, cnix, config, lsp, tasks, utils};
use clap::crate_version;
use cli_table::Table;
use cli_table::{print_stderr, WithTitle};
Expand All @@ -8,7 +8,6 @@ use miette::{bail, Result};
use nix::sys::signal;
use nix::unistd::Pid;
use serde::Deserialize;
use serde_json::Value;
use sha2::Digest;
use std::collections::HashMap;
use std::io::Write;
Expand Down Expand Up @@ -398,7 +397,9 @@ impl Devenv {
}

pub async fn lsp(&mut self) -> Result<()> {
self.assemble(false)?;
let options = self.nix.build(&["optionsJSON"]).await?;
debug!("{:?}", options);
let options_path = options[0]
.join("share")
.join("doc")
Expand Down
Loading

0 comments on commit 96c015c

Please sign in to comment.