Skip to content

Commit

Permalink
chore: fix merge with parent
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Sep 12, 2024
1 parent 998e7c5 commit bc9b9f8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/convert/transformers/decomposedPermissionSetTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ import {
addChildType,
forceIgnoreAllowsComponent,
getOutputFile,
getWriteInfosFromMerge,
getWriteInfosWithoutMerge,
hasChildTypeId,
setDecomposedState,
tagToChildTypeId,
} from './decomposedMetadataTransformer';
import type { InfoContainer, ComposedMetadata } from './types';
Expand Down Expand Up @@ -84,7 +82,6 @@ export class DecomposedPermissionSetTransformer extends BaseMetadataTransformer
if (forceIgnore.denies(getOutputFile(component, mergeWith))) {
return [];
}
const stateSetter = setDecomposedState(this.context.decomposition.transactionState);
const composedMetadata = await getComposedMetadataEntries(component);

const parentXmlObject: XmlObj = {
Expand Down Expand Up @@ -112,7 +109,15 @@ export class DecomposedPermissionSetTransformer extends BaseMetadataTransformer
]);

const writeInfoForParent = mergeWith
? getWriteInfosFromMerge(mergeWith)(stateSetter)(parentXmlObject)(component)
? [
{
output: join(
ensureString(mergeWith.content),
`${component.name}.${ensureString(component.type.suffix)}${META_XML_SUFFIX}`
),
source: new JsToXml(parentXmlObject),
},
]
: getWriteInfosWithoutMerge(this.defaultDirectory)(parentXmlObject)(component);

return [...writeInfosForChildren, ...writeInfoForParent];
Expand Down

2 comments on commit bc9b9f8

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: bc9b9f8 Previous: c6f9783 Ratio
eda-componentSetCreate-linux 226 ms 236 ms 0.96
eda-sourceToMdapi-linux 2332 ms 2378 ms 0.98
eda-sourceToZip-linux 1863 ms 1881 ms 0.99
eda-mdapiToSource-linux 2922 ms 2890 ms 1.01
lotsOfClasses-componentSetCreate-linux 435 ms 431 ms 1.01
lotsOfClasses-sourceToMdapi-linux 3666 ms 3767 ms 0.97
lotsOfClasses-sourceToZip-linux 3094 ms 3080 ms 1.00
lotsOfClasses-mdapiToSource-linux 3581 ms 3544 ms 1.01
lotsOfClassesOneDir-componentSetCreate-linux 749 ms 745 ms 1.01
lotsOfClassesOneDir-sourceToMdapi-linux 6536 ms 6485 ms 1.01
lotsOfClassesOneDir-sourceToZip-linux 5726 ms 5603 ms 1.02
lotsOfClassesOneDir-mdapiToSource-linux 6416 ms 6502 ms 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: bc9b9f8 Previous: c6f9783 Ratio
eda-componentSetCreate-win32 719 ms 696 ms 1.03
eda-sourceToMdapi-win32 4768 ms 4723 ms 1.01
eda-sourceToZip-win32 3272 ms 3352 ms 0.98
eda-mdapiToSource-win32 6404 ms 6382 ms 1.00
lotsOfClasses-componentSetCreate-win32 1320 ms 1369 ms 0.96
lotsOfClasses-sourceToMdapi-win32 8560 ms 8536 ms 1.00
lotsOfClasses-sourceToZip-win32 5555 ms 5617 ms 0.99
lotsOfClasses-mdapiToSource-win32 8700 ms 8632 ms 1.01
lotsOfClassesOneDir-componentSetCreate-win32 2344 ms 2246 ms 1.04
lotsOfClassesOneDir-sourceToMdapi-win32 14337 ms 14957 ms 0.96
lotsOfClassesOneDir-sourceToZip-win32 9823 ms 9455 ms 1.04
lotsOfClassesOneDir-mdapiToSource-win32 14406 ms 14221 ms 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.