unisonweb / unison

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

user error: InvalidBranchFile #1490

Open aryairani opened 4 years ago

aryairani commented 4 years ago
ucm: user error (InvalidBranchFile "/Users/arya/.unison/v1/paths/46jpbjr2aj8i111igc0ed38dsr01q8n0nrt2rvnk3bs9hm05dhrdg2peibdh36d0nqstdb5jpprtvoml45fdtve169j7q3gjdc3uts0.ub" "No such file: /Users/arya/.unison/v1/paths/46jpbjr2aj8i111igc0ed38dsr01q8n0nrt2rvnk3bs9hm05dhrdg2peibdh36d0nqstdb5jpprtvoml45fdtve169j7q3gjdc3uts0.ub")

I got this when exciting ucm this morning; I am hoping it resulted from having forgotten ucm running in one terminal, and then doing a bunch of stuff with it in another, including but not limited to deleting and replacing my ~/.unison.

IMO though, any running, idle ucm process should still keep up.

I would start here, in HandleInput.hs:

    Left (IncomingRootBranch hashes) ->
      eval . Notify . WarnIncomingRootBranch $ Set.map (SBH.fromHash sbhLength) hashes
aryairani commented 4 years ago

Update: It looks like I must have deleted (and not replaced) my ~/.unison. So, well, what do we want to do in that case? I guess: exit with a better message.