unisonweb / unison

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

`data.Bag.tests.bagOf` round-trips in isolation, but not with `edit.namespace` #5307

Open aryairani opened 2 months ago

aryairani commented 2 months ago
@unison/base/main> 

  Loading changes detected in ~/work/unison/trunk/scratch.u.

  The expression in red

                needs the abilities: {Gen}
    but was assumed to only require: {#qs5k41jlro}

  This is likely a result of using an un-annotated function as an argument with concrete abilities. Try adding an annotation to the function definition whose body is red.

   12957 |       (Map.toList (tests.mapOf a (do natInOrder() Nat.+ 1) ()))
mitchellwrosen commented 2 months ago

edit.namespace applied to which namespace?

aryairani commented 2 months ago

I think we figured this out; it's the "Gen (in file) got new UUID that tests.mapOf (not in file) doesn't know about.

aryairani commented 2 months ago

edit.namespace applied to which namespace?

Must have been @unison/base with some definitions commented out.