Skip to content

Commit 14e03cd

Browse files
committed
fix: keep process resource usage in Python and account render-raised reference codes
1 parent 636f484 commit 14e03cd

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎crates/sqlbuild-python/src/bindings/_helpers/diagnostics/trackers.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ use pyo3::{pyclass, pymethods};
99

1010
use crate::bindings::_helpers::compile_driver::python_calls::{context_variable, imported};
1111

12-
const DIAGNOSTICS_MODELS_MODULE: &str = "sqlbuild._native";
12+
const NATIVE_MODULE: &str = "sqlbuild._native";
13+
const DIAGNOSTICS_MODELS_MODULE: &str = "sqlbuild.diagnostics.models";
1314
const PROCESS_RESOURCES_MODULE: &str = "sqlbuild.diagnostics._helpers.process_resources";
1415
const TRACKER_VARIABLE: &str = "sqlbuild_build_phase_timing_tracker";
1516
const PHASES: [&str; 6] = [
@@ -100,8 +101,7 @@ impl BuildPhaseTimingTracker {
100101
keywords.set_item(phase, value)?;
101102
}
102103
keywords.set_item("total_seconds", non_negative(now, self.started_at))?;
103-
imported(py, DIAGNOSTICS_MODELS_MODULE, "PartialBuildPhaseTimings")?
104-
.call((), Some(&keywords))
104+
imported(py, NATIVE_MODULE, "PartialBuildPhaseTimings")?.call((), Some(&keywords))
105105
}
106106

107107
/// Return the active build timing tracker.

‎scripts/compiler_differential/constants.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,9 @@ def short_model_names(*, model: Model, ctx: RuleContext) -> list[Finding]:
542542
}
543543
RENDER_CONFIG_ONLY_KINDS: dict[str, str] = {}
544544
DIAGNOSTIC_CODE_PATTERN: re.Pattern[str] = re.compile(r"[A-Z][0-9]{3}")
545-
RENDER_RAISED_CODES: frozenset[str] = frozenset({"C214", "C216", "K012", "P004", "P010", "P011"})
545+
RENDER_RAISED_CODES: frozenset[str] = frozenset(
546+
{"C214", "C216", "K012", "P004", "P010", "P011", "P012", "P013"}
547+
)
546548
RENDER_CODE_SCAN_EXCLUDED: dict[str, str] = {
547549
"_helpers/analysis": "SQL analysis of rendered SQL, after the CompileProjectInputs frontier",
548550
}

0 commit comments

Comments
 (0)