Skip to content

Commit d649440

Browse files
committed
fix: dont print source for typecheck bc no one cares about the c code in the server anyways
1 parent b10ab3b commit d649440

File tree

5 files changed

+1
-17
lines changed

5 files changed

+1
-17
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pg_typecheck/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ tree_sitter_sql.workspace = true
2525

2626
[dev-dependencies]
2727
pg_test_utils.workspace = true
28-
unicode-normalization = "0.1.24"
2928

3029
[lib]
3130
doctest = false

crates/pg_typecheck/src/diagnostics.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,6 @@ impl Advices for TypecheckAdvices {
8686
visitor.record_log(LogCategory::Info, &markup! { "Hint: "{hint}"" })?;
8787
}
8888

89-
// Show source location if available
90-
if let (Some(file), Some(line)) = (&self.file, &self.line) {
91-
if let Some(routine) = &self.routine {
92-
visitor.record_log(
93-
LogCategory::Info,
94-
&markup! { "Source: "{file}":"{line}" in "{routine}"" },
95-
)?;
96-
} else {
97-
visitor.record_log(LogCategory::Info, &markup! { "Source: "{file}":"{line}"" })?;
98-
}
99-
}
100-
10189
Ok(())
10290
}
10391
}

crates/pg_typecheck/tests/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async fn test(name: &str, query: &str, setup: &str) {
4545
let content = String::from_utf8(content).unwrap();
4646

4747
// Normalize Unicode characters
48-
let normalized = content.nfkd().collect::<String>();
48+
let normalized = content.nfkc().collect::<String>();
4949

5050
insta::with_settings!({
5151
prepend_module_to_snapshot => false,

crates/pg_typecheck/tests/snapshots/invalid_column.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ typecheck ━━━━━━━━━━━━━━━━━━━━━━━
88
<strong><span style="color: Tomato;">✖</span></strong> <span style="color: Tomato;">column &quot;unknown&quot; does not exist</span>
99

1010
<strong><span style="color: Tomato;">✖</span></strong> <span style="color: Tomato;">Error Code: </span><span style="color: Tomato;"><strong>42703</strong></span>
11-
12-
<strong><span style="color: lightgreen;">i</span></strong> <span style="color: lightgreen;">Source: </span><span style="color: lightgreen;">parse_relation.c</span><span style="color: lightgreen;">:</span><span style="color: lightgreen;">3716</span><span style="color: lightgreen;"> in </span><span style="color: lightgreen;">errorMissingColumn</span>

0 commit comments

Comments
 (0)