Skip to content

changed: a grown file read against its base names what was added and what changed - #1803

Merged
swapnilpaliwal-sd merged 2 commits into
0.1.9from
apps/typescript/range-diff-uses-current-spans-on-base
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 2 commits into
0.1.9from
apps/typescript/range-diff-uses-current-spans-on-base

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

changed (--range, the edit hook, a refreshed graph) misread a file that grew when the graph came from a later text than the base:

  • a parameter inserted into a one-per-line header was "body" (and a plain parameter an added field); now the signature change
  • <constructor> (TS/JS/C#) is found by its spelled name (constructor, or the type's name) instead of reported removed or left at the graph's line
  • new TS methods with a return type, exported functions, and a function after the class in the same insertion are named; a local in them is no longer a field
  • a method only the later graph declares is no longer an "overload" of itself
  • <arrow> / <function-expression> / <anonymous-method> are lambdas: an edit inside one is its method's body
  • with no recorded tree, the file on disk is tried as the graph's text (spans are checked against it first); a Python line appended after a body's last line is that body

Checked: new case grown-file-read-against-its-base (ts with a control, js, csharp, python; ts 3/4 fail before, 4/4 after). Case suites ts 172/176, js 237/237, cs 196/198, java 298/298, py 262/263 (every failure is the same with the pre-change scripts). Engine ts 97/0. Product: 9988 call edges and 29/73 probes, both before and after; the reported range now gives 0 removed, 0 false fields, and 4/4 added.

…what changed

When the graph is from a later text of a file than the base it is read against
(--range, the edit hook, a refresh), `changed` misread a file that grew:

- a parameter inserted into a header written one per line was "body", and a
  plain parameter read as an added field; it is now the signature change
- a constructor recorded as `<constructor>` (TypeScript, JavaScript, C#) was
  never found by name: "removed", or left at the graph's line with a note that
  the graph was indexed from uncommitted edits; its header is looked for as
  `constructor` or the type's name
- new TypeScript methods with a return type, exported functions, and a function
  after the class in the same insertion were unnamed "N new line(s)", and a
  local inside them could pass for a field
- a method only the later graph declares was called an overload of itself
- `<arrow>`, `<function-expression>`, `<anonymous-method>` are lambdas: an edit
  inside one is its method's body
- with no recorded tree, the file on disk is tried as the graph's text (the
  spans are checked against it before it is used)
- a Python statement appended after a body's last line is that body

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
Base automatically changed from apps/integration-0.1.9 to 0.1.9 September 30, 2026 02:26
Keeps 0.1.9's FUNCTION_TYPE_KINDS and this branch's wider LAMBDA_NAMES.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 2c3c68b into 0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the apps/typescript/range-diff-uses-current-spans-on-base branch September 30, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant