3 ms·
i think what you (and the OP) are describing goes beyond making merges more robust to nonfunctional changes by using something like an AST representation. makin
by a-dub 5y ago
i think what you (and the OP) are describing goes beyond making merges more robust to nonfunctional changes by using something like an AST representation. making text edits apply cleanly is one part of the problem, but as the OP notes, the harder part of these merges is actually when interfaces stay the same but behavior changes. i think that to solve that, you'd need some kind of static analyzer that could jump from changed lines/syntax to execution paths and then to diffs of them.
i bet there are some cool papers out there on trying to do this... but, this is essentially a restatement of the halting problem, so building something that is guaranteed to be correct using only static analysis may be impossible. (but this does not preclude a solution that might be good enough)
- catlifeonmars 5y agoWell in an ideal world, Liskov’s substitution principle applies and you only ever care about interface changes.
- catlifeonmars 5y agoI’m this same world, you don’t make breaking changes without a new version of the interface. I like living in fantasy land :)