-
Notifications
You must be signed in to change notification settings - Fork 137
[hermes] Hermes is responsible for all terminal UI #3020
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
[hermes] Hermes is responsible for all terminal UI #3020
Conversation
Summary of ChangesHello @joshlf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly upgrades the terminal user interface and error reporting mechanisms within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this 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 significantly improves the terminal user interface for Hermes by introducing a progress spinner during compilation and better handling of stderr to prevent silent failures. The addition of a comprehensive set of UI-related integration tests is a great step towards ensuring robustness. The changes to the diagnostic rendering to support indicatif are well-implemented. I have a couple of suggestions to improve code clarity and robustness in the test suite and stderr handling.
| for line in reader.lines() { | ||
| if let Ok(line) = line { | ||
| if let Ok(mut buf) = safety_buffer_clone.lock() { | ||
| buf.push(line); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation silently ignores errors when locking the safety_buffer, which can happen if another thread panics while holding the lock (a poisoned lock). This can lead to silent data loss in the buffer, making debugging harder. It's better to panic explicitly when the lock is poisoned to make such bugs immediately visible. This can be done by using .unwrap() on the lock result.
This applies to all places where safety_buffer is locked (here and on lines 148, 155, 171).
Also, the loop can be simplified using flatten() to handle Result from the lines() iterator.
A revised implementation for this loop could look like this:
for line in reader.lines().flatten() {
// If the lock is poisoned, it's better to panic to surface the issue.
safety_buffer_clone.lock().unwrap().push(line);
}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## Gd1a7f9c4436f266d37e83ebc2310f5a99a73d24d #3020 +/- ##
============================================================================
Coverage ? 91.87%
============================================================================
Files ? 20
Lines ? 6057
Branches ? 0
============================================================================
Hits ? 5565
Misses ? 492
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… errors * Normalize paths between integration runner's * Map cargo's absolute shadow output paths reliably by replacing temporary workspaces * Inject effectively through Charon driver * Remove diagnostic prints and fallback to deterministic string-replacement for verification assertions * Fix mapping of outputs to use robust non-spanning fallbacks gherrit-pr-id: Gd1a7f9c4436f266d37e83ebc2310f5a99a73d24d
gherrit-pr-id: Gc48bae5a713c0931a406c162369f4a30ddc1f2b3
eee41fb to
34f4c95
Compare
0062c3c to
6b62149
Compare
6b62149 to
8771c47
Compare
|
Squashed into #3019 |
transform::apply_edits#3025mod foo;declarations #3008Latest Update: v10 — Compare vs v9
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gc48bae5a713c0931a406c162369f4a30ddc1f2b3 && git checkout -b pr-Gc48bae5a713c0931a406c162369f4a30ddc1f2b3 FETCH_HEADCheckout
git fetch origin refs/heads/Gc48bae5a713c0931a406c162369f4a30ddc1f2b3 && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gc48bae5a713c0931a406c162369f4a30ddc1f2b3 && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.