Skip to content

Commit

Permalink
fix: exclusions for preset/variant decomposed
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jul 25, 2024
1 parent feb8f4e commit 29f7a24
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/collections/componentSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ export class ComponentSet extends LazyCollection<MetadataComponent> {
if (
type.strategies?.transformer === 'decomposed' &&
// exclude (ex: CustomObjectTranslation) where there are no addressable children
Object.values(type.children?.types ?? {}).every((t) => t.unaddressableWithoutParent !== true)
Object.values(type.children?.types ?? {}).some((t) => t.unaddressableWithoutParent !== true) &&
Object.values(type.children?.types ?? {}).some((t) => t.isAddressable !== false)
) {
const parentComp = [...(cmpMap?.values() ?? [])].find((c) => c.fullName === fullName);
if (parentComp?.xml && !objectHasSomeRealValues(type)(parentComp.parseXmlSync())) {
Expand Down
7 changes: 7 additions & 0 deletions src/registry/presets/decomposeWorkflowBeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,48 +41,55 @@
"id": "workflowalert",
"name": "WorkflowAlert",
"suffix": "workflowAlert",
"unaddressableWithoutParent": true,
"xmlElementName": "alerts"
},
"workflowfieldupdate": {
"directoryName": "workflowFieldUpdates",
"id": "workflowfieldupdate",
"name": "WorkflowFieldUpdate",
"suffix": "workflowFieldUpdate",
"unaddressableWithoutParent": true,
"xmlElementName": "fieldUpdates"
},
"workflowknowledgepublish": {
"directoryName": "workflowKnowledgePublishes",
"id": "workflowknowledgepublish",
"name": "WorkflowKnowledgePublish",
"suffix": "workflowKnowledgePublish",
"unaddressableWithoutParent": true,
"xmlElementName": "knowledgePublishes"
},
"workflowoutboundmessage": {
"directoryName": "workflowOutboundMessages",
"id": "workflowoutboundmessage",
"name": "WorkflowOutboundMessage",
"suffix": "workflowOutboundMessage",
"unaddressableWithoutParent": true,
"xmlElementName": "outboundMessages"
},
"workflowrule": {
"directoryName": "workflowRules",
"id": "workflowrule",
"name": "WorkflowRule",
"suffix": "workflowRule",
"unaddressableWithoutParent": true,
"xmlElementName": "rules"
},
"workflowsend": {
"directoryName": "workflowSends",
"id": "workflowsend",
"name": "WorkflowSend",
"suffix": "workflowSend",
"unaddressableWithoutParent": true,
"xmlElementName": "send"
},
"workflowtask": {
"directoryName": "workflowTasks",
"id": "workflowtask",
"name": "WorkflowTask",
"suffix": "workflowTask",
"unaddressableWithoutParent": true,
"xmlElementName": "tasks"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,48 +47,55 @@
"id": "workflowalert",
"name": "WorkflowAlert",
"suffix": "workflowAlert",
"unaddressableWithoutParent": true,
"xmlElementName": "alerts"
},
"workflowfieldupdate": {
"directoryName": "workflowFieldUpdates",
"id": "workflowfieldupdate",
"name": "WorkflowFieldUpdate",
"suffix": "workflowFieldUpdate",
"unaddressableWithoutParent": true,
"xmlElementName": "fieldUpdates"
},
"workflowknowledgepublish": {
"directoryName": "workflowKnowledgePublishes",
"id": "workflowknowledgepublish",
"name": "WorkflowKnowledgePublish",
"suffix": "workflowKnowledgePublish",
"unaddressableWithoutParent": true,
"xmlElementName": "knowledgePublishes"
},
"workflowoutboundmessage": {
"directoryName": "workflowOutboundMessages",
"id": "workflowoutboundmessage",
"name": "WorkflowOutboundMessage",
"suffix": "workflowOutboundMessage",
"unaddressableWithoutParent": true,
"xmlElementName": "outboundMessages"
},
"workflowrule": {
"directoryName": "workflowRules",
"id": "workflowrule",
"name": "WorkflowRule",
"suffix": "workflowRule",
"unaddressableWithoutParent": true,
"xmlElementName": "rules"
},
"workflowsend": {
"directoryName": "workflowSends",
"id": "workflowsend",
"name": "WorkflowSend",
"suffix": "workflowSend",
"unaddressableWithoutParent": true,
"xmlElementName": "send"
},
"workflowtask": {
"directoryName": "workflowTasks",
"id": "workflowtask",
"name": "WorkflowTask",
"suffix": "workflowTask",
"unaddressableWithoutParent": true,
"xmlElementName": "tasks"
}
}
Expand Down

2 comments on commit 29f7a24

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 29f7a24 Previous: b60ca89 Ratio
eda-componentSetCreate-linux 181 ms 188 ms 0.96
eda-sourceToMdapi-linux 2231 ms 2360 ms 0.95
eda-sourceToZip-linux 1858 ms 1783 ms 1.04
eda-mdapiToSource-linux 3070 ms 2906 ms 1.06
lotsOfClasses-componentSetCreate-linux 358 ms 363 ms 0.99
lotsOfClasses-sourceToMdapi-linux 3673 ms 3679 ms 1.00
lotsOfClasses-sourceToZip-linux 3061 ms 3129 ms 0.98
lotsOfClasses-mdapiToSource-linux 3501 ms 3511 ms 1.00
lotsOfClassesOneDir-componentSetCreate-linux 630 ms 616 ms 1.02
lotsOfClassesOneDir-sourceToMdapi-linux 6408 ms 6571 ms 0.98
lotsOfClassesOneDir-sourceToZip-linux 5411 ms 5765 ms 0.94
lotsOfClassesOneDir-mdapiToSource-linux 6320 ms 6346 ms 1.00

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

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 29f7a24 Previous: b60ca89 Ratio
eda-componentSetCreate-win32 401 ms 421 ms 0.95
eda-sourceToMdapi-win32 4284 ms 3839 ms 1.12
eda-sourceToZip-win32 2849 ms 2789 ms 1.02
eda-mdapiToSource-win32 5900 ms 5841 ms 1.01
lotsOfClasses-componentSetCreate-win32 797 ms 923 ms 0.86
lotsOfClasses-sourceToMdapi-win32 7323 ms 8024 ms 0.91
lotsOfClasses-sourceToZip-win32 4554 ms 5117 ms 0.89
lotsOfClasses-mdapiToSource-win32 7434 ms 8138 ms 0.91
lotsOfClassesOneDir-componentSetCreate-win32 1450 ms 1627 ms 0.89
lotsOfClassesOneDir-sourceToMdapi-win32 12895 ms 14294 ms 0.90
lotsOfClassesOneDir-sourceToZip-win32 8435 ms 9468 ms 0.89
lotsOfClassesOneDir-mdapiToSource-win32 13195 ms 14425 ms 0.91

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

Please sign in to comment.