Skip to content

Remove redundant information in failure messages#321

Open
zainab-ali wants to merge 2 commits intotypelevel:mainfrom
zainab-ali:remove-source-location-from-header
Open

Remove redundant information in failure messages#321
zainab-ali wants to merge 2 commits intotypelevel:mainfrom
zainab-ali:remove-source-location-from-header

Conversation

@zainab-ali
Copy link
Copy Markdown
Contributor

@zainab-ali zainab-ali commented May 1, 2026

This changeset reduces the verbosity of scalacheck failures, and general failures, by removing redundant information

  • The source location of an error is currently rendered twice: once on the first line of the error, and again when pointing to the source code. This can be noisy when the source file path is long.
  • For scalacheck failures, the seed is rendered twice
  • For scalacheck failures, inputs are rendered on a single line. This is difficult to read when inputs have long string representations.

Change

  • The source location on the first line has been removed from all errors
  • The scalacheck seed on the first line has been removed
  • scalacheck inputs are rendered on separate lines

Scalacheck message before

image

Scalacheck message after

image

Expectation failure before

image

Expectation failure after

image

@zainab-ali zainab-ali force-pushed the remove-source-location-from-header branch from 2bbb652 to 9b922f0 Compare May 1, 2026 16:35
@zainab-ali zainab-ali marked this pull request as ready for review May 1, 2026 17:01
@zainab-ali zainab-ali changed the title Remove source location from first error message line. Remove redundant information in failure messages May 1, 2026
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