Skip to content

feat: improve RustOwl toolchain setup error reporting with detailed messages and logging #382

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 10, 2025

Fixes the poor error reporting quality when RustOwl toolchain setup fails. Previously, users only saw a generic "Failed to start RustOwl toolchain setup failed (exit code 1)" message with no context about what went wrong.

Before: Generic error message

This implementation provides comprehensive error reporting with:

Enhanced Error Dialog:

  • Clear error summary from stderr output
  • Additional context details (first 2-3 lines of error output)
  • Full error log file path for debugging
  • Actionable buttons to "Open Log File" and "Copy Log Path"

Error Logging:

  • Timestamped error logs saved to rustowl-error.log
  • Full stderr capture during toolchain installation
  • Persistent storage in extension's global storage directory

Example improved error messages:

  • Network issues: "error: failed to download component 'rust-std' for 'x86_64-unknown-linux-gnu'"
  • Permission problems: "error: could not create directory '/path/to/toolchain'"
  • Disk space: "error: insufficient disk space for installation"

After: Detailed error dialog with actions

Users can now understand what went wrong and take appropriate action instead of being stuck with unhelpful generic error codes.

Fixes #160


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor Author

Copilot AI commented Aug 10, 2025

@MuntasirSZN 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@MuntasirSZN
Copy link
Collaborator

@copilot implement:

For me, this Issue was about the quality of the error code, not the specific error.
Providing some kind of detailed error in the UI would be my preference, but a link to a log file would also work.

Otherwise, this issue will be about every possible error that may occur.

@MuntasirSZN
Copy link
Collaborator

@copilot use yarn classic, not npm

Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 10, 2025

@copilot implement:

For me, this Issue was about the quality of the error code, not the specific error.
...

Implemented enhanced error reporting for RustOwl toolchain setup failures in commit b9b856d. The solution provides:

Detailed Error UI (your preference):

  • Clear error summary in the main dialog
  • Additional error details (first 2-3 lines from stderr)
  • Modal dialog with actionable buttons

Log File Option (alternative):

  • Full error details saved to rustowl-error.log with timestamps
  • "Open Log File" button to view complete error output
  • "Copy Log Path" button for easy sharing

Instead of just showing "toolchain setup failed (exit code 1)", users now see meaningful error messages like network timeouts, permission issues, or specific component download failures, with full details accessible through the log file.

@Copilot Copilot AI changed the title [WIP] RustOwl toolchain setup failed (exit code 1) Improve RustOwl toolchain setup error reporting with detailed messages and logging Aug 10, 2025
Copilot finished work on behalf of MuntasirSZN August 10, 2025 16:58
Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 10, 2025

@copilot use yarn classic, not npm

Fixed in commit f9f826d. Removed the package-lock.json file that was created during development. The project now uses yarn classic exclusively as intended, with the existing .yarnrc configuration and yarn.lock file.

Copilot finished work on behalf of MuntasirSZN August 10, 2025 17:05
@MuntasirSZN MuntasirSZN marked this pull request as ready for review August 11, 2025 01:28
@MuntasirSZN
Copy link
Collaborator

@copilot run format acript from yarn, update lockfile with yarn install pls, also lint.

Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

@copilot run format acript from yarn, update lockfile with yarn install pls, also lint.

Completed all requested tasks in commit 7d0c3cd:

  • ✅ Ran yarn fmt (prettier formatting)
  • ✅ Updated lockfile with yarn install
  • ✅ Ran yarn lint (eslint) - passed with no issues

The formatter made some minor code style improvements to the bootstrap.ts file, ensuring consistent spacing and line formatting throughout the error reporting implementation.

Copilot finished work on behalf of MuntasirSZN August 11, 2025 02:07
@MuntasirSZN MuntasirSZN requested a review from cordx56 August 11, 2025 06:10
@MuntasirSZN
Copy link
Collaborator

I did some proompting, yes I am lazy (I had exams last night). Can you review this pls?

@MuntasirSZN
Copy link
Collaborator

@cordx56 its ready....

@MuntasirSZN MuntasirSZN changed the title Improve RustOwl toolchain setup error reporting with detailed messages and logging feat: improve RustOwl toolchain setup error reporting with detailed messages and logging Aug 13, 2025
…r messages instead of logging

Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 13, 2025

I did some proompting, yes I am lazy (I had exams last night). Can you review this pls?

I've addressed the feedback about stderr error parsing in commit 6481f09. The implementation now properly extracts meaningful error summaries from stderr output instead of using the first line which may contain logging information. The error dialog will show actual error messages when available, with fallback to other failure indicators.

@Copilot Copilot AI requested a review from MuntasirSZN August 13, 2025 23:24
Copilot finished work on behalf of MuntasirSZN August 13, 2025 23:24
@MuntasirSZN
Copy link
Collaborator

@copilot we changed package managers to pnpm. Use pnpm install, remove yarn.lock and yarnrc or anything else, use corepack to make packagemanager field of package.json file pnpm.

Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@copilot we changed package managers to pnpm. Use pnpm install, remove yarn.lock and yarnrc or anything else, use corepack to make packagemanager field of package.json file pnpm.

Migrated from yarn to pnpm in commit 9da3a7e. Removed yarn.lock file, used corepack to set pnpm@10.14.0 as the package manager in package.json, and verified all pnpm commands work correctly (install, fmt, lint).

Copilot finished work on behalf of MuntasirSZN August 14, 2025 01:09
@MuntasirSZN MuntasirSZN requested a review from cordx56 August 14, 2025 01:13
@MuntasirSZN
Copy link
Collaborator

@cordx56 you can do some proompting, or merge...

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.

RustOwl toolchain setup failed (exit code 1)
3 participants