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/G9611b9a3ca0254d8ba488d591e6a21980cca3d29 && git checkout -b pr-G9611b9a3ca0254d8ba488d591e6a21980cca3d29 FETCH_HEAD

Checkout

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

Cherry Pick

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

Pull

git pull origin refs/heads/G9611b9a3ca0254d8ba488d591e6a21980cca3d29

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
@joshlf joshlf force-pushed the G9611b9a3ca0254d8ba488d591e6a21980cca3d29 branch from 3c5c8f4 to d92de78 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 (a113bca) to head (3150404).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           G1bd8ca80c7b97b4c799cec1504d281ae79f329b1    #3004   +/-   ##
==========================================================================
  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 source code transformation capabilities to the hermes tool. The main changes involve adding a transform module to modify the source code of unsafe functions, and refactoring the parsing logic to accommodate this. The transformed code is not yet utilized, which seems to be planned for future work. My review focuses on improving error handling and fixing a bug in the UI test shim's error reporting.

F: FnMut(&str, Result<ParsedLeanItem, HermesError>),
{
visit_hermes_items_internal(source, Some(path.to_path_buf()), f)
let source = fs::read_to_string(path).expect("Failed to read file");
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Using expect here will cause a panic if the file cannot be read. The function signature -> Result<String, io::Error> suggests that the error should be propagated. Using the ? operator would be more appropriate and align with the function's contract.

Suggested change
let source = fs::read_to_string(path).expect("Failed to read file");
let source = fs::read_to_string(path)?;

parse::read_file_and_visit_hermes_items(&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.

high

The source variable from the closure is a slice of the source code for the specific item, not the entire file. emit_rustc_json needs the full file source to calculate correct line/column numbers. This will lead to incorrect error locations in UI tests. You should pass the full file source to emit_rustc_json. One way to achieve this is to collect errors in the closure and process them later when you have access to the full source string returned by read_file_and_visit_hermes_items.

Comment on lines +42 to +43
let mut source = source.into_bytes();
transform::apply_edits(&mut source, &edits);
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 transformed source buffer is created but not used. I assume the intention is to either print it to stdout or write it to a file, which will be implemented in a subsequent change. Could you confirm if this is the case?

}
});
})
.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() here will cause a panic if read_file_and_visit_hermes_items returns an io::Error (e.g., if the file doesn't exist). The previous implementation was more robust with unwrap_or_default(). Please handle the Err case gracefully, for example by printing an error and exiting with a non-zero status code.

gherrit-pr-id: G9611b9a3ca0254d8ba488d591e6a21980cca3d29
@joshlf joshlf force-pushed the G9611b9a3ca0254d8ba488d591e6a21980cca3d29 branch from 777a0e4 to 3150404 Compare February 10, 2026 23:18
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