Skip to content

Handle syntax errors in parallel runs #2172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2025
Merged

Conversation

gaborcsardi
Copy link
Member

Example output now (imagine the colors):

❯ testthat::test_local(filter = "api-dev", reporter = "progress")
Starting 1 test process
✔ | F W  S  OK | Context

Error in `private$handle_error()` at testthat/R/parallel-taskq.R:82:15:
! testthat subprocess exited in file `test-api-dev.R`
Caused by error:
! in callr subprocess.
Caused by error:
! test-api-dev.R:23:8: unexpected symbol
22:
23: syntax error
           ^
Run `rlang::last_trace()` to see where the error occurred.

Closes #1360.

Example output now (imagine the colors):
```
❯ testthat::test_local(filter = "api-dev", reporter = "progress")
Starting 1 test process
✔ | F W  S  OK | Context

Error in `private$handle_error()` at testthat/R/parallel-taskq.R:82:15:
! testthat subprocess exited in file `test-api-dev.R`
Caused by error:
! in callr subprocess.
Caused by error:
! test-api-dev.R:23:8: unexpected symbol
22:
23: syntax error
           ^
Run `rlang::last_trace()` to see where the error occurred.
```

Closes #1360.
@gaborcsardi gaborcsardi requested a review from hadley August 5, 2025 07:58
@gaborcsardi gaborcsardi merged commit 6099802 into main Aug 5, 2025
13 checks passed
@gaborcsardi gaborcsardi deleted the fix/parallel-syntax-error branch August 5, 2025 16:01
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.

Silently ignoring syntax error in test file?
2 participants