File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,9 @@ export class DataSchemaCompiler {
704704 return undefined ;
705705 }
706706
707+ // We update the yaml file content to the transpiled js content
708+ // and raise related flag so it will go JS transpilation flow afterward
709+ // avoiding costly YAML/Python parsing again.
707710 private async transpileYamlFile (
708711 file : FileContent ,
709712 errorsReport : ErrorReporter ,
@@ -751,14 +754,12 @@ export class DataSchemaCompiler {
751754
752755 this . compiledYamlCache . set ( cacheKey , res . content ) ;
753756
754- return { ...file , content : res . content } ;
757+ return { ...file } ;
755758 } else {
756759 const transpiledFile = this . yamlCompiler . transpileYamlFile ( file , errorsReport ) ;
757760
758761 this . compiledYamlCache . set ( cacheKey , transpiledFile ?. content || '' ) ;
759762
760- this . compiledYamlCache . set ( cacheKey , transpiledFile ?. content || '' ) ;
761-
762763 return transpiledFile ;
763764 }
764765 }
You can’t perform that action at this time.
0 commit comments