Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Feb 7, 2026


Latest Update: v35 — Compare vs v34

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v35 v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/G1bd8ca80c7b97b4c799cec1504d281ae79f329b1 && git checkout -b pr-G1bd8ca80c7b97b4c799cec1504d281ae79f329b1 FETCH_HEAD

Checkout

git fetch origin refs/heads/G1bd8ca80c7b97b4c799cec1504d281ae79f329b1 && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/G1bd8ca80c7b97b4c799cec1504d281ae79f329b1 && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/G1bd8ca80c7b97b4c799cec1504d281ae79f329b1

Stacked PRs enabled by GHerrit.

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@joshlf joshlf force-pushed the G1bd8ca80c7b97b4c799cec1504d281ae79f329b1 branch from cd76106 to cdbf265 Compare February 7, 2026 06:10
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.87%. Comparing base (cd1ecc6) to head (a113bca).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           G3b521f32cf769ffedd72f84e60f1e73a8d590e4c    #3003   +/-   ##
==========================================================================
  Coverage                                      91.87%   91.87%           
==========================================================================
  Files                                             20       20           
  Lines                                           6057     6057           
==========================================================================
  Hits                                            5565     5565           
  Misses                                           492      492           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf
Copy link
Member Author

joshlf commented Feb 7, 2026

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a UI testing framework for the hermes tool, which is a valuable addition for ensuring correctness and providing clear error reporting. The implementation uses the ui_test crate and a shim to make hermes behave like rustc for testing purposes. My review has identified one critical issue in the test setup that would prevent the tests from running, along with several medium-severity suggestions to improve the robustness and error handling of the test shim itself. Overall, this is a solid foundation for UI testing.

assert!(status.success(), "Failed to build binary '{}'", name);

let mut path = PathBuf::from(manifest_dir);
path.push("..");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The path to the compiled binary is constructed incorrectly. The target directory is located at the workspace root, which is two levels above the hermes crate's manifest directory (tools/hermes/). The current code only goes up one level (..), which will result in an incorrect path (tools/target/...). This will cause the assert! on line 38 to fail. You need to go up two levels to find the workspace's target directory.

Suggested change
path.push("..");
path.push("..");
path.push("..");

});

// Run logic with JSON emitter
let source = fs::read_to_string(&file_path).unwrap_or_default();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using unwrap_or_default() can hide file reading errors. If fs::read_to_string fails, it will proceed with an empty string, and the test will likely pass silently because no hermes items will be found. This can make debugging tests more difficult. It's better to panic with a clear message if the test file cannot be read.

Suggested change
let source = fs::read_to_string(&file_path).unwrap_or_default();
let source = fs::read_to_string(&file_path).expect("Failed to read test file");

parse::visit_hermes_items_in_file(&file_path, &source, |res| {
if let Err(e) = res {
has_errors = true;
emit_rustc_json(&e, &source, file_path.to_str().unwrap());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Calling .unwrap() on file_path.to_str() can cause a panic if the file path contains non-UTF-8 characters, which is possible on some systems. It's safer and more idiomatic to use display() to get a string representation of the path, which gracefully handles non-UTF-8 characters.

Suggested change
emit_rustc_json(&e, &source, file_path.to_str().unwrap());
emit_rustc_json(&e, &source, &file_path.display().to_string());

byte_start: offset,
byte_end: offset + len,
line_start,
line_end: line_start, // Assuming single line for simplicity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation assumes that errors span only a single line by setting line_end: line_start. While this is sufficient for the current error types, it could produce incorrect diagnostic spans for more complex, multi-line errors in the future. To make this more robust, consider calculating line_end properly based on the full span of the error.

rendered: format!("error: {}\n", msg),
};

eprintln!("{}", serde_json::to_string(&diag).unwrap());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using .unwrap() can cause a panic without a descriptive message if JSON serialization fails. While unlikely for this structure, it's good practice to use .expect() to provide a more informative error message in case of a panic, which aids in debugging.

Suggested change
eprintln!("{}", serde_json::to_string(&diag).unwrap());
eprintln!("{}", serde_json::to_string(&diag).expect("Failed to serialize diagnostic to JSON"));

gherrit-pr-id: G1bd8ca80c7b97b4c799cec1504d281ae79f329b1
@joshlf joshlf force-pushed the G1bd8ca80c7b97b4c799cec1504d281ae79f329b1 branch from cdbf265 to a113bca Compare February 10, 2026 00:50
@joshlf joshlf force-pushed the G3b521f32cf769ffedd72f84e60f1e73a8d590e4c branch from 298708d to cd1ecc6 Compare February 10, 2026 00:50
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