Skip to content

CC-1545: Improve error messages (stderr) for Interpreter scanning error stages#58

Closed
rohitpaulk wants to merge 8 commits intomainfrom
test-stderr-changes
Closed

CC-1545: Improve error messages (stderr) for Interpreter scanning error stages#58
rohitpaulk wants to merge 8 commits intomainfrom
test-stderr-changes

Conversation

@rohitpaulk
Copy link
Member

@andy1li
Copy link
Member

andy1li commented Jan 3, 2025

@rohitpaulk ready for review.

  1. Add [stderr] to indicate which lines are for stderr
  2. Add blank lines before and after stderr error messages to make them more readable

  • lexical_errors/1_missing_line
image
  • lexical_errors/2_mismatch
image
  • lexical_errors/3_extra_line
image
  • multiline_errors/1_missing_line
image
  • multiline_errors/2_mismatch
image
  • multiline_errors/3_extra_line
image

@andy1li andy1li force-pushed the test-stderr-changes branch from 878868c to df6a85e Compare January 3, 2025 01:40
@andy1li andy1li force-pushed the test-stderr-changes branch from df6a85e to 455409a Compare January 3, 2025 01:40
@andy1li andy1li force-pushed the test-stderr-changes branch from a0eaf83 to 4af00b6 Compare January 3, 2025 02:02
@andy1li andy1li changed the title Test stderr changes CC-1545: Improve error messages (stderr) for Interpreter scanning error stages Jan 3, 2025
@linear
Copy link

linear bot commented Jan 3, 2025

@andy1li andy1li self-assigned this Jan 3, 2025
@rohitpaulk
Copy link
Member Author

Let's try printing out all our assertions for each line in order. Let's make sure to ALWAYS include stdout and stderr, only ignore one of them if there are no lines expected and no lines were printed. In all other cases, we include both.

Stdout lines: 

✅ Line 1
✅ Line 2

Stderr lines: 

— (skipped) Line 1 -- Keep these white
✅ [Line 1] XYZ
- (skipped) Line 2 -- Keep these white
❌ [Line 1] XYZ

Expected: "[Line 2] XYZ"
Received: "[Line 1] XYZ"

Note: 2 lines were skipped since they didn't start with `[Line N]`.

@rohitpaulk rohitpaulk closed this Sep 10, 2025
@rohitpaulk
Copy link
Member Author

Closing as stale

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