Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tree-sitter to 0.22 #386

Merged
merged 3 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dsc_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ version = "3.0.0-preview.7"
edition = "2021"

[dependencies]
base64 = "0.21"
base64 = "0.22"
chrono = "0.4.26"
derive_builder ="0.20"
indicatif = { version = "0.17" }
jsonschema = "0.17"
num-traits = "0.2"
regex = "1.7"
reqwest = { version = "0.11", features = ["blocking"] }
reqwest = { version = "0.12", features = ["blocking"] }
schemars = { version = "0.8.12", features = ["preserve_order"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"] }
serde_yaml = { version = "0.9.3" }
thiserror = "1.0"
chrono = "0.4.26"
security_context_lib = { path = "../security_context_lib" }
tracing = "0.1.37"
tracing-indicatif = { version = "0.3.6" }
tree-sitter = "0.20"
tree-sitter = "0.22"
tree-sitter-dscexpression = { path = "../tree-sitter-dscexpression" }

[dev-dependencies]
Expand Down
10 changes: 5 additions & 5 deletions dsc_lib/src/dscresources/dscresource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ pub trait Invoke {
fn test(&self, expected: &str) -> Result<TestResult, DscError>;

/// Invoke the delete operation on the resource.
///
///
/// # Arguments
///
///
/// * `filter` - The filter as JSON to apply to the resource.
///
///
/// # Errors
///
///
/// This function will return an error if the underlying resource fails.
fn delete(&self, filter: &str) -> Result<(), DscError>;

Expand Down Expand Up @@ -256,7 +256,7 @@ impl Invoke for DscResource {
let resource_manifest = import_manifest(manifest.clone())?;
command_resource::invoke_delete(&resource_manifest, &self.directory, filter)
},
}
}
}

fn validate(&self, config: &str) -> Result<ValidateResult, DscError> {
Expand Down
3 changes: 1 addition & 2 deletions dsc_lib/src/dscresources/resource_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub enum Kind {
Resource,
}


#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct ResourceManifest {
Expand All @@ -28,7 +27,7 @@ pub struct ResourceManifest {
/// The kind of resource.
#[serde(skip_serializing_if = "Option::is_none")]
pub kind: Option<Kind>,
/// The version of the resource.
/// The version of the resource using semantic versioning.
pub version: String,
/// The description of the resource.
pub description: Option<String>,
Expand Down
2 changes: 1 addition & 1 deletion dsc_lib/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Statement {
/// This function will return an error if the underlying parser fails to initialize.
pub fn new() -> Result<Self, DscError> {
let mut parser = Parser::new();
parser.set_language(tree_sitter_dscexpression::language())?;
parser.set_language(&tree_sitter_dscexpression::language())?;
let function_dispatcher = FunctionDispatcher::new();
Ok(Self {
parser,
Expand Down
38 changes: 38 additions & 0 deletions tree-sitter-dscexpression/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Rust artifacts
Cargo.lock
target/

# Node artifacts
build/
prebuilds/
node_modules/
*.tgz

# Swift artifacts
.build/

# Go artifacts
go.sum
_obj/

# Python artifacts
.venv/
dist/
*.egg-info
*.whl

# C artifacts
*.a
*.so
*.so.*
*.dylib
*.dll
*.pc

# Example dirs
/examples/*/

# Grammar volatiles
*.wasm
*.obj
*.o
4 changes: 2 additions & 2 deletions tree-sitter-dscexpression/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-dscexpression"
description = "DSCExpression grammar for the tree-sitter parsing library"
version = "0.0.1"
version = "0.1.0"
keywords = ["incremental", "parsing", "DSCExpression"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/powershell/dsc"
Expand All @@ -20,7 +20,7 @@ include = [
path = "bindings/rust/lib.rs"

[dependencies]
tree-sitter = "0.20"
tree-sitter = "0.22"

[build-dependencies]
cc = "1.0"
Loading
Loading