Skip to content
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
10 changes: 5 additions & 5 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions crates/codegraph-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ tree-sitter-php = "0.23"
tree-sitter-c = "0.23"
tree-sitter-cpp = "0.23"
tree-sitter-kotlin-sg = "0.4"
tree-sitter-swift = "0.7"
tree-sitter-scala = "0.25"
tree-sitter-swift = "0.6"
tree-sitter-scala = "0.24"
tree-sitter-bash = "0.23"
tree-sitter-hcl = "1"
tree-sitter-elixir = "0.3"
Expand Down
14 changes: 13 additions & 1 deletion crates/codegraph-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct BuildConfig {
pub aliases: std::collections::HashMap<String, String>,
}

#[derive(Debug, Clone, Deserialize, Default)]
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BuildSettings {
/// Whether incremental builds are enabled (default: true).
Expand All @@ -35,6 +35,18 @@ pub struct BuildSettings {
pub drift_threshold: f64,
}

// Manual impl so `BuildSettings::default()` matches the serde field defaults.
// `#[derive(Default)]` would give `incremental: false`, which disagrees with
// `#[serde(default = "default_true")]` when the outer `build` key is absent.
impl Default for BuildSettings {
fn default() -> Self {
Self {
incremental: default_true(),
drift_threshold: default_drift_threshold(),
}
}
}

fn default_true() -> bool {
true
}
Expand Down
Loading