unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

Definition Diffs: Only emit annotation changes for hash changes #5269

Closed ChrisPenner closed 3 months ago

ChrisPenner commented 3 months ago

Overview

In a definition diff we tag changes where only the hash changed differently by emitting an annotationChange; but previously we would emit one for ANY annotation changes, even if the annotations were completely unrelated things. This restricts it so we only treat something as an annotation change if it's a hash change.

Implementation notes

When collapsing annotation changes, check that both annotations are hashy syntax elements beforehand.

Interesting/controversial decisions

Nah not really, talked it over with @hojberg

Test coverage

Added a regression test containing one of the examples where this got weird.