dgibson / dtc

Device Tree Compiler
218 stars 130 forks source link

annotations: extend source position information for properties #67

Open bmx666 opened 2 years ago

bmx666 commented 2 years ago

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

dgibson commented 2 years ago

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.

bmx666 commented 2 years ago

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.

dgibson commented 2 years ago

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.

bmx666 commented 2 years ago

@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

dgibson commented 7 months ago

@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.

bmx666 commented 7 months ago

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