unisonweb / unison

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

ucm seems to get a stray carriage return after an edit command #624

Open atacratic opened 5 years ago

atacratic commented 5 years ago

I type edit quickstart.dsort like it says in the quickstart and hit enter. The command runs nicely, but then I see two prompts rather than one, as if I'd pressed enter again - but I haven't.

.> edit quickstart.dsort

  ☝️

  I added these definitions to the top of /home/chris/u1/scratch.u

    quickstart.dsort :
      (a -> a -> base.Boolean) -> [a] ->{quickstart.Remote} [a]
    quickstart.dsort lt as =
      use base.Universal <
      if base.List.size as < 2 then as
      else
        case base.List.halve as of
          (l, r) ->
            use quickstart dsort
            use quickstart.remote force
            use quickstart.remote.Remote at spawn
            leftF = at spawn '(dsort lt l)
            rightF = at spawn '(dsort lt r)
            quickstart.merge lt (force leftF) (force rightF)

  You can edit them there, then do `update` to replace the definitions
  currently in this namespace.

.> 
.> 

Notice the extra .> at the end.

I've tried this twice and seen it both times. Other commands, for example help, don't show this behavior.

This is on a fresh install of Ubuntu 18.04.2, using M1a.

aryairani commented 4 years ago

@atacratic Are you still seeing this issue?

atacratic commented 4 years ago

Yup, still seeing it!

aryairani commented 3 months ago

Still in 0.5.23

aryairani commented 3 months ago

It's because edit triggers a change that the file watcher notices. The file watcher knows to ignore this change that ucm generated, but it still prints another prompt after ignoring it.