unison icon indicating copy to clipboard operation
unison copied to clipboard

Problem adding documentation when there is a todo

Open dvberkel opened this issue 1 year ago • 1 comments

I discovered a ucm behavior that surprised me. I can reproduce in the following manner:

  1. Create new project.
  2. Open a scratch file.
  3. Create a watch expression > todo "This will fail"
  4. Create a definition answer = 42
  5. Save the file, the definition is marked as new
  6. Add it to the code base

Step six fails with a message that there is nothing to add.

  Loading changes detected in ~/orgs/unisonlanguage/scratch.u.


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


  💔💥
  
  I've encountered a call to builtin.todo with the following value:
  
    "This will fail"
  
  Stack trace:
    todo
    #1ogehb3tt5

todo-problem/main> add

  😶
  
  There's nothing for me to add right now.
  
  Hint: I'm currently watching for definitions in .u files under the ~/orgs/unisonlanguage
        directory. Make sure you've updated something there before using the `add` or `update`
        commands, or use `load` to load a file explicitly.

My expectation would be that the definition would be added to the code base

Environment (please complete the following information):

  • ucm --version: unison version: release/0.5.25 (built on 2024-07-22)
  • OS/Architecture: Ubuntu, Intel

Additional context The problem was also discussed on Discord

dvberkel avatar Sep 18 '24 07:09 dvberkel