Skip to content

Comments silently dropped on update #6262

Description

@zitongcharliedeng

Version: release/1.3.0

Comments in a scratch file are discarded when the definition is added. No warning at load or at update.

Repro

-- why this exists
commented : Nat -> Nat
commented n =
  use Nat +
  n + 2 -- why two
scratch/main> load /tmp/demo3.u
  + commented : Nat -> Nat
scratch/main> update
  Done.
scratch/main> view commented
  commented : Nat -> Nat
  commented n =
    use Nat +
    n + 2

Comments gone, nothing printed.

Why this matters

A comment is human intention, thrown out without warning. The lifecycle of a comment is to become a permanent literate doc. update is where that promotion should happen, and instead it is where the intention dies.

Expected

update lifts the comment into the definition's doc, or at minimum says it is dropping it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions