File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ async function applySettings() {
6060}
6161
6262async function compileAndValidate ( ) {
63+ let compilationFailed = false ;
6364 const spawnedProcess = spawn (
6465 ( process . platform !== "win32" ) ? "dataform" : "dataform.cmd" ,
6566 [ "compile" , "--json" , ...settings . compilerOptions ]
@@ -76,11 +77,7 @@ async function compileAndValidate() {
7677 ) ;
7778 return ;
7879 } else {
79- connection . sendNotification (
80- "error" ,
81- "Errors encountered when running 'dataform' CLI. Please check the output for more information."
82- ) ;
83- return ;
80+ compilationFailed = true ;
8481 }
8582 }
8683
@@ -99,8 +96,15 @@ async function compileAndValidate() {
9996
10097 if ( parsedResult ?. graphErrors ?. compilationErrors ) {
10198 parsedResult . graphErrors . compilationErrors . forEach ( compilationError => {
102- connection . sendNotification ( "error" , compilationError . message ) ;
99+ connection . sendNotification ( "error" , compilationError . fileName + ": " + compilationError . message ) ;
103100 } ) ;
101+ if ( compilationFailed ) {
102+ connection . sendNotification (
103+ "error" ,
104+ "Errors encountered when running 'dataform' CLI. Please check the output for more information."
105+ ) ;
106+ return ;
107+ }
104108 } else {
105109 connection . sendNotification ( "success" , "Project compiled successfully" ) ;
106110 }
You can’t perform that action at this time.
0 commit comments