Skip to content

run output doesn't get spliced into transcripts #1172

@atacratic

Description

@atacratic

The output of run commands goes to the wrong place during transcript parsing.

Input transcript:

    ```unison
    hi = '(printLine "Hello world!")
    ```

    ```ucm
    .> add
    .> run hi
    ```

Console output during transcript parsing:


  Transcript will be run on a new, empty codebase.

  ⚠️
  
  Initializing a new codebase in: /home/chris/unison/transcript-53622049952cfb9b.

   _____     _             
  |  |  |___|_|___ ___ ___ 
  |  |  |   | |_ -| . |   |
  |_____|_|_|_|___|___|_|_|
  
  Running the provided transcript file...
  

⚙️   Processing stanza 2 of 3.Hello world!
⚙️   Processing stanza 3 of 3.
💾  Wrote /home/chris/unison/transcript-run.output.md

Note this wrongly includes the "Hello world!" output.

Transcript output produced:

    ```unison
    hi = '(printLine "Hello world!")
    ```

    ```ucm

      I found and typechecked these definitions in scratch.u. If you
      do an `add` or `update`, here's how your codebase would
      change:
      
        ⍟ These new definitions are ok to `add`:
        
          hi : ∀ (). () ->{IO} ()
       
      Now evaluating any watch expressions (lines starting with
      `>`)... Ctrl+C cancels.

    ```
    ```ucm
    .> add

      ⍟ I've added these definitions:
      
        hi : ∀ (). () ->{IO} ()

    .> run hi

    ```

This output wrongly omits the "Hello world!"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions