Robust Process Handling and UTF-8 Encoding#140
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…sibility for CI - Updated ExecuteProcessAndCapture in cli/Utils.cs to use UTF-8 encodings and a multi-step termination sequence (wait, kill tree, wait, throw). - Changed visibility of source-generated attributes (ObfuscateAttribute, FinalEnumAttribute, etc.) and utility classes from internal to public to resolve SMA0080 errors in test assemblies. - Ensured exit codes are correctly captured in cli/Utils.cs even if exceptions occur during output redirection. - Confirmed pre-existing sandbox build failures are unrelated to these changes.
- Add UTF-8 redirection encodings for all captured processes. - Implement robust cleanup sequence in a try-finally block. - Add sequence of wait, kill-tree, wait, and check with exception in finally block. - Add descriptive reason for suppressed InvalidOperationException.
- Initialize Console.OutputEncoding to UTF-8 in cli/Program.cs - Set StandardOutputEncoding and StandardErrorEncoding to UTF-8 in cli/Utils.cs - Implement wait-kill-wait-throw sequence in ExecuteProcessAndCapture finally block - Use 310ms intervals and entireProcessTree: true for process cleanup - Add requested "Ignore exception: " comments in catch blocks
- Initialize Console.OutputEncoding = Encoding.UTF8 in cli/Program.cs - Implement SetupUtf8Environment helper in cli/Utils.cs to set DOTNET_CLI_FORCE_UTF8_ENCODING=true - Update ExecuteProcessAndCapture to use SetupUtf8Environment and UTF-8 redirect encodings - Implement robust wait-kill-wait sequence in finally block with 310ms intervals - Catch InvalidOperationException during process property access with "Ignore exception: " prefix - Ensure all CLI-driven processes (including dotnet build) follow these standards
Updated ExecuteProcessAndCapture in cli/Utils.cs to use UTF-8 for standard output and error redirection. Implemented a robust termination sequence in a finally block: waiting 310ms before killing the process tree if it hasn't exited, followed by another 310ms wait and an exception if the process still persists.
PR created automatically by Jules for task 16560461597742043263 started by @sator-imaging