File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export class JSONTransform extends Visitor {
3232 public imports : ImportStatement [ ] = [ ] ;
3333 public simdStatements : string [ ] = [ ] ;
3434
35- private visitedClasses : Set < string > = new Set < string > ( ) ;
35+ public visitedClasses : Set < string > = new Set < string > ( ) ;
3636
3737 visitClassDeclarationRef ( node : ClassDeclaration ) : void {
3838 if (
@@ -1281,6 +1281,14 @@ export default class Transformer extends Transform {
12811281
12821282 afterParse ( parser : Parser ) : void {
12831283 const transformer = JSONTransform . SN ;
1284+
1285+ // Reset singleton state to prevent pollution across compilations
1286+ // This is critical for worker pools where the same process handles multiple compilations
1287+ transformer . schemas = new Map < string , Schema [ ] > ( ) ;
1288+ transformer . sources = new SourceSet ( ) ;
1289+ transformer . visitedClasses = new Set < string > ( ) ;
1290+ transformer . simdStatements = [ ] ;
1291+
12841292 const sources = parser . sources
12851293 . filter ( ( source ) => {
12861294 const p = source . internalPath ;
You can’t perform that action at this time.
0 commit comments