unison/unison-src/transcripts/block-on-required-update.output.md
Greg Pfeil 0031542faf
Add a space before code block info strings
This is for consistency with the `cmark` style. Now the blocks we still
pretty-print ourselves will match the bulk of them that `cmark`
produces.
2024-07-10 13:56:07 -06:00

1.2 KiB

Block on required update

Should block an add if it requires an update on an in-file dependency.

x = 1

  Loading changes detected in scratch.u.

  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`:
    
      x : Nat

scratch/main> add

  ⍟ I've added these definitions:
  
    x : Nat

Update x, and add a new y which depends on the update

x = 10
y = x + 1

  Loading changes detected in scratch.u.

  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`:
    
      y : Nat
    
    ⍟ These names already exist. You can `update` them to your
      new definition:
    
      x : Nat

Try to add only the new y. This should fail because it requires an update to x, but we only ran an 'add'.

scratch/main> add y

  x These definitions failed:
  
    Reason
    needs update   x   : Nat
    blocked        y   : Nat
  
    Tip: Use `help filestatus` to learn more.