Skip to content

v0.9.0

Latest

Choose a tag to compare

@ivorpad ivorpad released this 21 Oct 17:56
  • var, why, Variable History and the Why card no longer count a read as a change. print(pyokka)
    and a bare pyokka log the value pyokka already had; var pyokka lists only the assignment on
    line 9, and why at a later step starts there. A logged value that differs from the known one
    stays, since it can show a change locals miss (d[k] = v on an existing key, an attribute).

  • A SyntaxError is placed on the line Python names: raised demo.py:20 in Exceptions, the gutter,
    the inline message and pyokka exceptions, where it said line 1. A file that parses but does not
    compile (return at module level) is placed on that statement too.

  • Compare marks the lines that differ again. Monaco's diff worker failed to start in the VS Code
    panel, so no diff was computed; the panel now starts it from the worker's own text.

  • Copy Value in On Save and On Demand asks before it runs the file ("Run and Copy") and then copies
    the value. It used to copy nothing.

  • Verify Fix lists the statements whose code changed first, and a baseline pinned during the Time
    Machine is compared with a rerun that logs the same values, so the auto-logged values no longer
    read as differences (24 differences became 10 on demo.py). A logged value and its variable
    change print once. When every expected value holds but the run fails, the verdict says so and
    names the error instead of "fix the code".

  • The Why tree's shared note prints a display path (orders/billing.py:3), not an absolute one.

  • The HTTP view and pyokka http give the size of a response without Content-Length (urllib,
    http.client) as the bytes the program read: 12 B, where it said — and 0 B.

  • why's conclusion no longer names one call's result as the value when the statement called the
    same function more than once. coltypes = [_column_type(c) for c in cols] read
    _column_type(...) returned <class 'str'>, the first column's type; it now says what the statement
    read.

  • The Why pane opens with a summary card above the tree, in one of three states, each sentence
    built from the tree's own values and checked against it before it is shown:

    • Change found: bo['lines'][0], the same object as line, was changed at #23 promo.py:4 in bulk_bonus: line["qty"] += 1, with the value it feeds, since when the names share it and the
      argument each parameter on the way came from.
    • Changed in between: bo['lines'][0]['qty'] was 1 at #15 main.py:9, and charge received 2 as order['lines'][0]['qty'] at #34 billing.py:5, comparing builtin values only, never object reprs.
    • No cause found: the value, and what the recording could not see (an object whose text shows
      nothing inside, a cut value, no locals, the cap, a chain cut short).
      Every place is a Time Machine link. "Record again, following objects" records the file once more
      following objects, with locals on, and the tree refreshes. pyokka why prints the same as
      answer:/signpost: lines after the conclusion. A fallback prints only the limits it found.
      Trees carry it as summary, plus followObjects: true on a recording that followed objects.
  • why follows a parameter back to the call that passed it. charge's order at #34 now reads
    passed bo at #33 main.py:12 main, and the walk goes on to the statement that last changed bo:
    #23, line["qty"] += 1 in bulk_bonus, in a --follow-objects recording, or #15, where bo
    still had qty 1, in a default one. Nodes carry it as argument. The link comes from the call
    site's source: methods (the receiver is self), keywords, *args/**kwargs, super().__init__,
    inherited __init__, __new__, property getters, functions kept in a variable and a function
    called twice in one statement (add(double(1), double(2))). When the source does not say which
    argument it was there is none: callbacks (sorted(rows, key=f), map(f, xs)), decorator
    wrappers, dunders Python calls itself, defaults. On eight standard-library modules 1,471 of 1,854
    parameters link, with no wrong argument found (docs/PROTOCOL.md, "Provenance").

  • --follow-objects no longer loses what a generator or coroutine does after it resumes: a for
    loop's target after the yield that ended its body (i read 0, 0, 0 for 0, 1, 2), the value
    got = yield total received, and v in v = await fetch(k). A statement split by a yield is
    closed again after the resume, and var lists its value after.