unisonweb / unison

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

fork can create unnamed dependencies #5044

Open ceedubs opened 1 month ago

ceedubs commented 1 month ago

It seems that the fork command doesn't check whether copying a namespace will result in unnamed dependencies in the current project.

A specific example that I ran into is when running fork /my-branch-1:JobContext.UserHandle JobContext.UserHandle. It copied over the JobContext.UserHandle namespace but not the JobContext.UserHandle type. So now all of the references to the UserHandle type show up in namespace.dependencies.

There's also a question of whether fork should just copy over the type that matches the name of forked namespace.

aryairani commented 4 weeks ago

@ceedubs Any suggestions? Or what's the bug exactly?

ceedubs commented 4 weeks ago

@aryairani at a minimum I think that fork should issue a warning if the result adds items to namespace.dependencies.