Revert "Fix info parameter not appearing in autograding failure messages"#19
Revert "Fix info parameter not appearing in autograding failure messages"#19smasongarrison wants to merge 1 commit intomainfrom
info parameter not appearing in autograding failure messages"#19Conversation
There was a problem hiding this comment.
Pull request overview
This PR reverts a prior change to the TAP failure-message parsing logic in the reusable autograding workflow, aiming to restore previous behavior for how testthat failure details are extracted and shown in the GitHub Actions summary.
Changes:
- Reverted logic that handled more complex
message:parsing in TAP diagnostics. - Adjusted message-line trimming and simplified message key detection.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| raw <- sub('^message:[[:space:]]*', '', msg_lines[msg_idx[1]]) | ||
| j <- msg_idx[1] + 1L | ||
| while (j <= length(msg_lines) && grepl('^ ', msg_lines[j])) { | ||
| raw <- paste0(raw, ' ', trimws(msg_lines[j])) | ||
| j <- j + 1L |
There was a problem hiding this comment.
msg_lines is built with trimws(...) earlier, so continuation lines won’t retain the leading indentation. That makes the while ( ... grepl('^ ', msg_lines[j])) loop effectively dead and truncates multi-line failure messages to just the first message: line. Consider either keeping an untrimmed copy of msg_lines for indentation-based parsing, or adjusting the continuation detection to not rely on leading spaces that have been stripped.
|
@copilot I'm sorry but I wanted you to actually fix the error, not remove the functionality |
|
@smasongarrison I've opened a new pull request, #20, to work on those changes. Once the pull request is ready, I'll request review from you. |
Reverts #18 ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.2.0 ✔ readr 2.2.0
✔ forcats 1.0.1 ✔ stringr 1.6.0
✔ ggplot2 4.0.2 ✔ tibble 3.3.1
✔ lubridate 1.9.5 ✔ tidyr 1.3.2
✔ purrr 1.2.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (http://conflicted.r-lib.org/) to force all conflicts to become errors
Attaching package: ‘MASS’
The following object is masked from ‘package:dplyr’:
Loading required package: viridisLite
Attaching package: ‘testthat’
The following objects are masked from ‘package:readr’:
Error: Error: '|' is an unrecognized escape in character string (:26:22)
Execution halted
Error: Tests failed to run (R error before metrics were written)