Skip to content

feat!: keep only the message in FLOW_ELEMENT_ERROR text - #128

Merged
lcottercertinia merged 1 commit into
mainfrom
feat/flow-errors
Oct 16, 2026
Merged

lcottercertinia merged 1 commit into
mainfrom
feat/flow-errors

Conversation

@lukecotter

@lukecotter lukecotter commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Overview

Make the FLOW_ELEMENT_ERROR text the error message only. The text ended with the element type and name, so a consumer had to cut them off. They are now in details.

🛠️ Changes

  • text is the message only. The element type and name move to details.elementType and details.elementName.
  • eventBody in the catalog is now the one place that joins a line's text and its continuation lines. eventText and the details reader both use it, so the element is correct when the message spans lines or holds a |.
  • An event text that is empty after its rewrite rule is now null, not ''.
  • The break is a bullet in .changeset/v1.md, with the other changes from v0.3.

🧩 Type of change

  • 🐛 Bug fix — fixes an issue
  • ✨ Feature — adds new functionality
  • ♻️ Refactor — no behaviour change
  • ⚡ Performance
  • 📝 Docs
  • 🔧 Chore — tooling, CI, deps
  • 💥 Breaking change

🔗 Related issues

Part of #123 (the FLOW_ELEMENT_ERROR text).

✅ Checklist

  • Tests added/updated
  • pnpm run ci passes locally
  • Changeset added (pnpm changeset) if this affects the published package
  • Docs updated if behaviour or the public API changed

Base automatically changed from feat/v1 to main October 15, 2026 16:46
lcottercertinia added a commit that referenced this pull request Oct 15, 2026
## 📝 Overview

v1: the new parser becomes the package root, and the legacy parser is
removed. This PR is stacked on #124. It merges after the v0.3 release.

## 🛠️ Changes

- Remove the legacy parser, its tests and the legacy side of the compare
tool.
- Move `src/next` to `src/`. The exports are now `.` (node build for the
`node` condition, else browser) and `./worker`. `./next` and
`./next/worker` are removed.
- Record the legacy parser's `bench:large` figures as the baseline
(`benchmarks/baselines/legacy-v0.3.json`).
- Remove every comment that describes a rule against the legacy parser.
- Rewrite the README, AGENTS.md and CONTRIBUTING.md for v1.
- Add a major changeset with the full list of breaking changes.

Performance against v0.3, on logs of 8 to 100 MB: 5–8× faster, with 6×
less memory. A 100 MB log parses in 182 ms instead of 1,215 ms, and
holds 141 MB instead of 812 MB.

Consumer check: debug-log-analyzer migrated locally (2548/2548 tests,
build), and checked by hand in the Extension Development Host. A 100 MB
log parses in about 220 ms in the webview.

## 🧩 Type of change

- [ ] 🐛 Bug fix — fixes an issue
- [x] ✨ Feature — adds new functionality
- [ ] ♻️ Refactor — no behaviour change
- [x] ⚡ Performance
- [x] 📝 Docs
- [ ] 🔧 Chore — tooling, CI, deps
- [x] 💥 Breaking change

## 🔗 Related issues

Stacked on #124.

Closes #34: `ofType` gives typed per-type indexes, and `events` an
iterative walk of every event.
Closes #35: every type has a `kind`, and SOSL has its own kind apart
from SOQL.
Closes #37: the new parser is the package root, and the legacy parser is
removed.
Closes #71: the catalog names every event's fields, and `EventFields`
documents each one.
Closes #123: `details.caught` on each throw (#129), and `flowErrors`
with the `FLOW_ELEMENT_ERROR` text change (#128). Both merge into this
branch first.
Closes #127: `DEBUG_CATEGORY_TOKEN` is exported from the package root.

## ✅ Checklist

- [x] Tests added/updated
- [x] `pnpm run ci` passes locally
- [x] Changeset added (`pnpm changeset`) if this affects the published
package
- [x] Docs updated if behaviour or the public API changed

---------

Co-authored-by: Luke Cotter <81575432+lcottercertinia@users.noreply.github.com>
@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing feat/flow-errors (76a0251) with main (3560a68)

Open in CodSpeed

@lcottercertinia
lcottercertinia marked this pull request as ready for review October 15, 2026 22:16
@lukecotter lukecotter changed the title feat!: add ApexLog.flowErrors and keep only the message in FLOW_ELEMENT_ERROR text feat!: keep only the message in FLOW_ELEMENT_ERROR text Oct 16, 2026
The text of a FLOW_ELEMENT_ERROR is now the message only. The element
type and name move to details, as elementType and elementName. The
parser reads them from the event body, the text before its rewrite, so
they are correct when the message spans lines or holds a |. eventBody
is now the one place that joins a line's text and its continuation
lines. An event text that is empty after its rewrite rule is now null.

BREAKING CHANGE: FLOW_ELEMENT_ERROR text no longer ends with the element
type and name, and it is null when the message is empty. Read
details.elementType and details.elementName instead.

Refs #123
@lcottercertinia
lcottercertinia merged commit c564955 into main Oct 16, 2026
10 checks passed
@lcottercertinia
lcottercertinia deleted the feat/flow-errors branch October 16, 2026 08:57
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.

2 participants