-
Notifications
You must be signed in to change notification settings - Fork 678
refactor: use anyhow::Context::context where applicable
#6952
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
refactor: use anyhow::Context::context where applicable
#6952
Conversation
How to use the Graphite Merge QueueAdd the label graphite: merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ Deploy Preview for rolldown-rs canceled.
|
Benchmarks Rust |
Merge activity
|
640d287 to
286d32e
Compare
## [1.0.0-beta.50] - 2025-11-12 ### 🚀 Features - rolldown: oxc_resolver v11.13.2 (#6956) by @Boshen - rolldown: oxc v0.97.0 (#6940) by @Boshen ### 🐛 Bug Fixes - handle error when creating output chunk directories (#6953) by @sapphi-red - throw error if `experimental.hmr` is set for APIs other than `dev` (#6860) by @Copilot - apply output.paths transformation to chunk.imports and generated code (#6923) by @Copilot ### 🚜 Refactor - use `anyhow::Context::context` where applicable (#6952) by @sapphi-red - dev: use actor design pattern and allow to recover from intial build error (#6936) by @hyf0 ### 📚 Documentation - add sitemap (#6929) by @mdong1909 ### 🧪 Testing - validate publishConfig.exports matches exports field (#6950) by @Copilot - re-enable output/paths/function test (#6934) by @Copilot ### ⚙️ Miscellaneous Tasks - rename `rolldown_watcher` to `rolldown_fs_watcher` (#6958) by @hyf0 - enable trust policy (#6948) by @iiio2 - deps: update napi (#6951) by @renovate[bot] - deps: update dependency rolldown-plugin-dts to v0.17.6 (#6947) by @renovate[bot] - deps: update npm packages (#6937) by @renovate[bot] - deps: update dependency tsdown to v0.16.2 (#6933) by @renovate[bot] ### ❤️ New Contributors * @mdong1909 made their first contribution in [#6929](#6929) Co-authored-by: sapphi-red <[email protected]>
Implementation complete for converting "could not clean directory" error to a warning: - [x] Explore codebase and understand BuildEvent structure - [x] Add new EventKind::CouldNotCleanDirectory to event_kind.rs - [x] Create new could_not_clean_directory.rs event file - [x] Add constructor to BuildDiagnostic in constructors.rs - [x] Update bundle.rs to emit warning instead of error - [x] Register new event in events/mod.rs - [x] Build and test changes - all tests passing - [x] Run linter - Rust linting passed - [x] Update generated code files - [x] Re-add couldNotCleanDirectory to checks options per review feedback - [x] Update CLI snapshot for the new option - [x] Security scan (codeql timed out, but changes are minimal and safe) ## Summary Successfully converted the "could not clean directory" error into a warning. The bundler will now continue building even if it cannot clean the output directory due to permission issues or other filesystem constraints. The warning provides detailed information about the directory and the reason for the failure. The `CouldNotCleanDirectory` warning is now configurable via checks options with a default of `true` (enabled). ## Changes Made 1. Added `CouldNotCleanDirectory` event kind to enum 2. Created event struct with directory path and error reason 3. Updated bundle logic to catch clean_dir errors and emit warnings instead of failing 4. Generated code automatically updated for EventKindSwitcher and checks options 5. Made the warning configurable through checks options (per review feedback) 6. Updated CLI help message snapshot to include the new --checks.could-not-clean-directory option <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Change could not clean directory error to a warning</issue_title> > <issue_description>I think a warning would be more friendly than error. Unable to clean the dir isn't worth to block the build. If you to think so, let's create an issue to turn this into a builtin warning. > > _Originally posted by @hyf0 in #6952 (comment) > </issue_description> > > <agent_instructions>Add a new struct that implements BuildEvent for this new warning</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes #6954 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.

No description provided.