Skip to content

Conversation

@sapphi-red
Copy link
Member

No description provided.

Copy link
Member Author


How to use the Graphite Merge Queue

Add 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.

@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 286d32e
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/691406c852540000089b8131

@sapphi-red sapphi-red self-assigned this Nov 12, 2025
@sapphi-red sapphi-red marked this pull request as ready for review November 12, 2025 03:50
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

Benchmarks Rust

  • target: main(b574863)
  • pr: 11-12-refactor_use_anyhow_context_context_where_applicable(286d32e)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     65.3±2.50ms        ? ?/sec    1.03     67.6±1.90ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     72.4±4.04ms        ? ?/sec    1.01     73.5±1.92ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    110.0±3.15ms        ? ?/sec    1.00    109.9±2.79ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    121.7±1.76ms        ? ?/sec    1.01    123.5±1.85ms        ? ?/sec
bundle/bundle@threejs                                        1.00     40.4±2.52ms        ? ?/sec    1.00     40.5±2.37ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     43.5±0.74ms        ? ?/sec    1.00     43.7±0.74ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    396.1±4.48ms        ? ?/sec    1.01    399.6±4.72ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    456.9±4.21ms        ? ?/sec    1.01    460.5±5.24ms        ? ?/sec
scan/scan@rome_ts                                            1.00     85.8±1.26ms        ? ?/sec    1.00     86.2±1.83ms        ? ?/sec
scan/scan@threejs                                            1.00     28.7±0.39ms        ? ?/sec    1.04     29.9±1.99ms        ? ?/sec
scan/scan@threejs10x                                         1.00    301.0±8.53ms        ? ?/sec    1.01    304.0±5.07ms        ? ?/sec

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 12, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 11-12-refactor_use_anyhow_context_context_where_applicable branch from 640d287 to 286d32e Compare November 12, 2025 04:02
@graphite-app graphite-app bot merged commit 286d32e into main Nov 12, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 11-12-refactor_use_anyhow_context_context_where_applicable branch November 12, 2025 04:14
shulaoda pushed a commit that referenced this pull request Nov 12, 2025
## [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]>
graphite-app bot pushed a commit that referenced this pull request Nov 12, 2025
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.
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.

3 participants