unisonweb / unison

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

bugfix: fix suffixification of indirect dependencies #5375

Closed mitchellwrosen closed 1 month ago

mitchellwrosen commented 1 month ago

Overview

Fixes #5374

This PR fixes a bug in suffixification of indirect dependencies. The bug was caused by the unnecessary-but-harmless optimization to the stopping condition of suffixification (Set.size matchingRefs == 1), which has been around forever, and which suddenly became necessary-not-to-do-and-decidedly-harmful-if-done after suffixification was amended to prefer direct deps to indirect deps in https://github.com/unisonweb/unison/pull/5338. The fix was simply to delete that optimization.

Test coverage

I've added a transcript (failing in the first commit) that demonstrates the fix.

ceedubs commented 1 month ago

I can confirm that this fixes the original issue that I reported for this!