Skip to content

Commit

Permalink
Move aspect processing before any clean up is started in change proce…
Browse files Browse the repository at this point in the history
…ssing (#128)

While experimenting locally, I found out that
`IModelExporter.sourceDbChanges` is cleaned up before aspects are
processed. It doesn't brake existing strategies, but if another strategy
is added or package consumers add their own custom strategy it might
lead to bugs.
  • Loading branch information
mindaugasdirg authored Nov 27, 2023
1 parent 7cd1e5c commit b7a6679
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions packages/transformer/src/IModelExporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ export class IModelExporter {
await this.exportFonts();
await this.exportModelContents(IModel.repositoryModelId);
await this.exportSubModels(IModel.repositoryModelId);
await this.exportAllAspects();
await this.exportRelationships(ElementRefersToElements.classFullName);

// handle deletes
Expand Down
1 change: 0 additions & 1 deletion packages/transformer/src/IModelTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,6 @@ export class IModelTransformer extends IModelExportHandler {
// must wait for initialization of synchronization provenance data
await this.exporter.exportChanges(this.getExportInitOpts(args));
await this.processDeferredElements(); // eslint-disable-line deprecation/deprecation
await this.exporter["exportAllAspects"](); // eslint-disable-line @typescript-eslint/dot-notation

if (this._options.optimizeGeometry)
this.importer.optimizeGeometry(this._options.optimizeGeometry);
Expand Down

0 comments on commit b7a6679

Please sign in to comment.