@@ -710,33 +710,25 @@ export class DataSchemaCompiler {
710710 private async transpileJinjaFile (
711711 file : FileContent ,
712712 errorsReport : ErrorReporter ,
713- { cubeNames , cubeSymbols , contextSymbols , transpilerNames , compilerId , stage } : TranspileOptions
713+ options : TranspileOptions
714714 ) : Promise < ( FileContent | undefined ) > {
715- // if (getEnv('transpilationNative')) {
716- //
717- // } else if (getEnv('transpilationWorkerThreads')) {
718- //
719- // } else {
720715 const transpileJinjaFileTimer = perfTracker . start ( 'transpileJinjaFile (common)' ) ;
721716
722- const transpiledFile = await this . yamlCompiler . compileYamlWithJinjaFile (
717+ const renderedFile = await this . yamlCompiler . renderTemplate (
723718 file ,
724- errorsReport ,
725719 this . standalone ? { } : this . cloneCompileContextWithGetterAlias ( this . compileContext ) ,
726720 this . pythonContext !
727721 ) ;
728- if ( transpiledFile ) {
729- // We update the jinja/yaml file content to the transpiled js content
730- // and raise related flag so it will go JS transpilation flow afterward
731- // avoiding costly YAML/Python parsing again.
732- file . content = transpiledFile . content ;
733- file . convertedToJs = true ;
734- }
722+
723+ // We update the jinja/yaml file content to the rendered content
724+ // to reuse the same transpileYamlFile() flow afterward which
725+ // will update the content to the transpiled js content
726+ // avoiding costly YAML/Python parsing again.
727+ file . content = renderedFile . content ;
735728
736729 transpileJinjaFileTimer . end ( ) ;
737730
738- return transpiledFile ;
739- // }
731+ return this . transpileYamlFile ( file , errorsReport , options ) ;
740732 }
741733
742734 public withQuery ( query , fn ) {
0 commit comments