Skip to content

Fix parse_error input spec#15393

Open
evadne wants to merge 1 commit into
elixir-lang:mainfrom
evadne:feature/parse-error-input-spec
Open

Fix parse_error input spec#15393
evadne wants to merge 1 commit into
elixir-lang:mainfrom
evadne:feature/parse-error-input-spec

Conversation

@evadne
Copy link
Copy Markdown
Contributor

@evadne evadne commented May 15, 2026

elixir_errors:parse_error/5 receives the original parser input as a 4-tuple that includes indentation. Both parser call sites pass {String, StartLine, StartColumn, Indentation}, and cut_snippet/3 already pattern matches that shape.

This updates the spec to match the existing runtime contract.

Verification

  • git diff --check
  • make compile

@evadne evadne force-pushed the feature/parse-error-input-spec branch from 255f334 to 32fdd72 Compare May 15, 2026 20:06
@evadne
Copy link
Copy Markdown
Contributor Author

evadne commented May 15, 2026

There is an unrelated failure in https://github.com/elixir-lang/elixir/actions/runs/25930787536/job/76225550506 which I am investigating separately. It seems to be a non-deterministic formatting issue with refs based on their internal values.

EDIT: This is related to #13954 where the diff strings in ExUnit.DiffTest were changed from being rendered in infinity-length lines to 80-column lines. This interacts with PIDs or Refs that have variable-length internal values and may sometimes fit on one line when the line length is not infinity. For example when 2 PIDs are both quite short (with low numerical values that require fewer digits) they end up on the same line where the expectation in the relevant tests was that they should be on 2 lines, or vice versa.

EDIT: #15396 is opened to address the intermittent error in the last workflow.

@evadne evadne force-pushed the feature/parse-error-input-spec branch from 32fdd72 to 10fcdd0 Compare May 16, 2026 01:43
@evadne evadne marked this pull request as ready for review May 16, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant