Diff view - #396
Conversation
f76cccc to
3244c34
Compare
653b5a1 to
5226c70
Compare
|
I think it's more or less done. I'm not sure if identifier links and search should redirect to the diff or to the target version. |
|
AI has comments! I've dropped one of its comment about merge-ability with another pending series. It'll be an easy merge, no worries there. Before that, I'm not sure I'm a fan of the UI. First I like the idea of diffing directories. But the UI is hard to read. Then it makes me think we could diff symbol pages as well? My main gripe is with the selection UI in the sidebar. Checkbox that does nothing on click. Then I had to guess to click another version. So one proposal:
What do you think? AI now: Three issues on the diff routes. Same index (needs both diffed versions) for 1. tree-diff warnings blame the wrong versionWhen the path is missing on one side of the diff, 2. redirects drop the diff, and
|
Note: this is work in progress, not ready for review. Comments are welcome, but I don't expect a full review just yet. Mostly posting this to show that there is some slow progress on this feature.
Right now, the feature only supports a split diff view. This neatly solves the "which version should an identifier link to" problem.
How the diffs are generated:
There is a slight efficiency problem with this approach - files can be very similar, but both will get tokenized and formatted separately. And IIRC formatting can take a lot of time.
I don't see a good way of solving that, maybe something smart could be done with the lexer/formatter.
The only optimization that could be worth it, is caching identifiers looked up in the first file for the second file (not implemented yet, and I don't know if it would make sense). I think it would also make sense to limit the size of diffed files - no one should do diffs on the 20 megabytes amdgpu register definitions.
Closes: #25