dtc icon indicating copy to clipboard operation
dtc copied to clipboard

annotations: extend source position information for properties

Open bmx666 opened this issue 3 years ago • 6 comments
trafficstars

merge_nodes, defined in livetree.c, uses srcpos_extend only for nodes.

bmx666 avatar Jan 05 '22 15:01 bmx666

merge_nodes, defined in livetree.c, uses srcpos_extend only for nodes.

Sorry it's taken me forever to look at this. However, this behaviour is intentional. Because the new property value entirely overwrites the old property value, I didn't think it made sense to include the now obsolete location in the annotations.

dgibson avatar May 25 '22 07:05 dgibson

Sorry @dgibson but then for nodes it's look a little bit strange, because you can remove whole node and re-create same node in different dts, BUT obsolete location will be left.

bmx666 avatar May 26 '22 17:05 bmx666

Sorry @dgibson but then for nodes it's look a little bit strange, because you can remove whole node and re-create same node in different dts, BUT obsolete location will be left.

That's a fair point. We should probably remove the old node srcpos information when we a /delete-node/ directive is processed.

dgibson avatar Jul 30 '22 05:07 dgibson

@dgibson I think after that a fair point, you understood I wanted to trace history path of property/node/label from first dts up to the latest when I asked about #62

bmx666 avatar Jul 30 '22 12:07 bmx666

@bmx666, obviously I haven't looked at this in ages. Sorry.

If you still want to pursue this, can you make a case for the behaviour change you'd like to see, then we can go from there.

dgibson avatar Jan 25 '24 03:01 dgibson

Hi @dgibson Sync with main branch without any conflicts. Nothing change since my last comment -> https://github.com/dgibson/dtc/pull/67#issuecomment-1200152301

bmx666 avatar Jan 26 '24 01:01 bmx666