Closed nikku closed 1 month ago
CC @nithinssabu
@nithinssabu via https://github.com/bpmn-io/bpmn-js-differ/pull/22/commits/7ffa85264743b9560683f815476ff97fd5a42b31 I sketched how a special differ, aware of moddle
elements can be added to the diff utility. As discussed we may then want to use the moddle
introspection utilities to iterate through all available properties.
Via https://github.com/bpmn-io/bpmn-js-differ/pull/22/commits/142c8b1dea79d5e9491cf15dc1f52e62443f81cf I sketch how the actual diffing would work; still two rough edges to sort out.
I moved this to review
as it works good on my machine. Feedback welcome.
As discussed @philippfromme, please have a look.
This could have introduced a bug in the library. See https://github.com/camunda/web-modeler/pull/10621#issuecomment-2311946929
This could have introduced a bug in the library. See camunda/web-modeler#10621 (comment)
Created a minimal reproducer. Just change the bpmn-js-differ
versions between 2.0.2
and 3.0.0
to see the difference in changes count.
Thanks for the report and steps to reproduce @nithinssabu.
As always, let's create a new bug report and take it from there :arrow_right: https://github.com/bpmn-io/bpmn-js-differ/issues/24.
Proposed Changes
The PR does not use plain object diffing for moddle elements, but rather uses the moddle meta-data to figure what is supposed to be diffed.
This ensures we're able to diff otherwise hidden references, too, such as
Flow#target
.Closes https://github.com/bpmn-io/bpmn-js-differ/issues/18.
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}