-
Notifications
You must be signed in to change notification settings - Fork 5.9k
refactor: use deno_core::anyhow::Error in favour of deno_core::error::AnyError
#31599
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request consistently replaces Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (3)cli/tools/**/*.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⚙️ CodeRabbit configuration file
Files:
cli/module_loader.rs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-11-24T16:19:37.808ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (7)
Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cli/tools/task.rs (1)
20-24: Optional: consider standardizing onAnyErrorin signatures for consistency. Currently some fns returndeno_core::anyhow::Errordirectly while others useAnyError.Also applies to: 263-311
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (108)
cli/args/flags.rs(1 hunks)cli/args/mod.rs(1 hunks)cli/bench/main.rs(1 hunks)cli/cache/cache_db.rs(1 hunks)cli/cache/check.rs(1 hunks)cli/cache/code_cache.rs(1 hunks)cli/cache/fast_check.rs(1 hunks)cli/cache/incremental.rs(1 hunks)cli/cache/module_info.rs(1 hunks)cli/cache/node.rs(1 hunks)cli/factory.rs(1 hunks)cli/file_fetcher.rs(1 hunks)cli/graph_container.rs(1 hunks)cli/graph_util.rs(1 hunks)cli/http_util.rs(1 hunks)cli/lib/standalone/virtual_fs.rs(1 hunks)cli/lib/util/result.rs(1 hunks)cli/lsp/analysis.rs(1 hunks)cli/lsp/client.rs(1 hunks)cli/lsp/code_lens.rs(1 hunks)cli/lsp/config.rs(1 hunks)cli/lsp/diagnostics.rs(1 hunks)cli/lsp/documents.rs(1 hunks)cli/lsp/jsr.rs(1 hunks)cli/lsp/language_server.rs(1 hunks)cli/lsp/lint.rs(1 hunks)cli/lsp/mod.rs(1 hunks)cli/lsp/npm.rs(1 hunks)cli/lsp/path_to_regex.rs(1 hunks)cli/lsp/registries.rs(1 hunks)cli/lsp/repl.rs(1 hunks)cli/lsp/search.rs(1 hunks)cli/lsp/testing/definitions.rs(1 hunks)cli/lsp/testing/execution.rs(1 hunks)cli/lsp/testing/server.rs(1 hunks)cli/lsp/text.rs(1 hunks)cli/lsp/tsc.rs(1 hunks)cli/lsp/urls.rs(1 hunks)cli/main.rs(1 hunks)cli/module_loader.rs(1 hunks)cli/npm.rs(1 hunks)cli/ops/jupyter.rs(1 hunks)cli/registry.rs(1 hunks)cli/rt/binary.rs(1 hunks)cli/rt/code_cache.rs(1 hunks)cli/rt/main.rs(1 hunks)cli/rt/run.rs(1 hunks)cli/standalone/binary.rs(1 hunks)cli/task_runner.rs(1 hunks)cli/tools/bench/mod.rs(1 hunks)cli/tools/bundle/esbuild.rs(1 hunks)cli/tools/bundle/html.rs(1 hunks)cli/tools/bundle/mod.rs(1 hunks)cli/tools/bundle/provider.rs(1 hunks)cli/tools/check.rs(1 hunks)cli/tools/clean.rs(1 hunks)cli/tools/compile.rs(1 hunks)cli/tools/coverage/mod.rs(1 hunks)cli/tools/coverage/reporter.rs(1 hunks)cli/tools/deploy.rs(1 hunks)cli/tools/doc.rs(1 hunks)cli/tools/fmt.rs(1 hunks)cli/tools/info.rs(1 hunks)cli/tools/init/mod.rs(1 hunks)cli/tools/installer/bin_name_resolver.rs(1 hunks)cli/tools/installer/mod.rs(1 hunks)cli/tools/jupyter/install.rs(1 hunks)cli/tools/jupyter/mod.rs(1 hunks)cli/tools/jupyter/server.rs(1 hunks)cli/tools/lint/linter.rs(1 hunks)cli/tools/lint/mod.rs(1 hunks)cli/tools/lint/plugins.rs(1 hunks)cli/tools/lint/reporters.rs(1 hunks)cli/tools/lint/rules/mod.rs(1 hunks)cli/tools/pm/approve_scripts.rs(1 hunks)cli/tools/pm/audit.rs(1 hunks)cli/tools/pm/cache_deps.rs(1 hunks)cli/tools/pm/deps.rs(1 hunks)cli/tools/pm/mod.rs(1 hunks)cli/tools/pm/outdated/mod.rs(2 hunks)cli/tools/publish/auth.rs(1 hunks)cli/tools/publish/diagnostics.rs(1 hunks)cli/tools/publish/graph.rs(1 hunks)cli/tools/publish/mod.rs(1 hunks)cli/tools/publish/module_content.rs(1 hunks)cli/tools/publish/paths.rs(1 hunks)cli/tools/publish/provenance.rs(1 hunks)cli/tools/publish/publish_order.rs(1 hunks)cli/tools/publish/tar.rs(1 hunks)cli/tools/repl/channel.rs(1 hunks)cli/tools/repl/editor.rs(1 hunks)cli/tools/repl/mod.rs(1 hunks)cli/tools/repl/session.rs(1 hunks)cli/tools/run/mod.rs(1 hunks)cli/tools/serve.rs(1 hunks)cli/tools/task.rs(1 hunks)cli/tools/test/mod.rs(1 hunks)cli/tools/upgrade.rs(1 hunks)cli/tools/x.rs(1 hunks)cli/tsc/go/setup.rs(1 hunks)cli/util/archive.rs(1 hunks)cli/util/display.rs(1 hunks)cli/util/extract.rs(1 hunks)cli/util/file_watcher.rs(1 hunks)cli/util/fs.rs(1 hunks)cli/util/text_encoding.rs(1 hunks)ext/bundle/src/lib.rs(1 hunks)ext/http/service.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rs: For debugging Rust code, set breakpoints in IDE debuggers (VS Code with rust-analyzer, IntelliJ IDEA) or uselldbdirectly
Useeprintln!()ordbg!()macros for debug prints in Rust code
Files:
cli/http_util.rscli/tools/publish/provenance.rscli/tools/init/mod.rscli/tools/bundle/mod.rscli/tsc/go/setup.rscli/cache/check.rscli/tools/jupyter/install.rscli/lsp/lint.rscli/tools/pm/outdated/mod.rscli/tools/jupyter/mod.rscli/standalone/binary.rscli/lib/standalone/virtual_fs.rscli/graph_container.rscli/lsp/search.rscli/lsp/client.rscli/tools/doc.rscli/tools/publish/publish_order.rscli/tools/compile.rscli/util/file_watcher.rscli/tools/x.rscli/file_fetcher.rscli/tools/run/mod.rscli/lsp/code_lens.rscli/tools/clean.rscli/cache/cache_db.rscli/lib/util/result.rscli/tools/fmt.rscli/util/text_encoding.rscli/tools/lint/reporters.rsext/bundle/src/lib.rscli/lsp/npm.rscli/lsp/config.rscli/tools/pm/audit.rscli/cache/fast_check.rscli/tools/installer/mod.rsext/http/service.rscli/tools/serve.rscli/lsp/testing/server.rscli/tools/repl/session.rscli/util/fs.rscli/tools/publish/tar.rscli/lsp/analysis.rscli/tools/pm/deps.rscli/tools/check.rscli/lsp/path_to_regex.rscli/tools/coverage/reporter.rscli/tools/bundle/html.rscli/graph_util.rscli/tools/coverage/mod.rscli/lsp/testing/execution.rscli/lsp/urls.rscli/ops/jupyter.rscli/tools/bundle/esbuild.rscli/tools/deploy.rscli/tools/lint/linter.rscli/tools/repl/editor.rscli/tools/lint/rules/mod.rscli/tools/pm/approve_scripts.rscli/lsp/mod.rscli/rt/binary.rscli/tools/lint/plugins.rscli/task_runner.rscli/tools/task.rscli/cache/incremental.rscli/lsp/diagnostics.rscli/tools/publish/auth.rscli/npm.rscli/tools/bench/mod.rscli/main.rscli/lsp/testing/definitions.rscli/lsp/registries.rscli/tools/jupyter/server.rscli/util/display.rscli/lsp/repl.rscli/lsp/text.rscli/cache/node.rscli/module_loader.rscli/tools/publish/paths.rscli/tools/publish/mod.rscli/tools/info.rscli/cache/code_cache.rscli/registry.rscli/bench/main.rscli/tools/pm/cache_deps.rscli/factory.rscli/tools/bundle/provider.rscli/rt/code_cache.rscli/tools/publish/module_content.rscli/tools/lint/mod.rscli/lsp/documents.rscli/tools/installer/bin_name_resolver.rscli/util/extract.rscli/tools/repl/mod.rscli/args/mod.rscli/rt/main.rscli/tools/pm/mod.rscli/util/archive.rscli/rt/run.rscli/args/flags.rscli/tools/test/mod.rscli/tools/publish/graph.rscli/tools/publish/diagnostics.rscli/lsp/tsc.rscli/cache/module_info.rscli/lsp/language_server.rscli/tools/upgrade.rscli/lsp/jsr.rscli/tools/repl/channel.rs
⚙️ CodeRabbit configuration file
Don't worry about coverage of Rust docstrings. Don't be nitpicky about it. Leave it to the author's judgement if such a documentation is necessary.
Files:
cli/http_util.rscli/tools/publish/provenance.rscli/tools/init/mod.rscli/tools/bundle/mod.rscli/tsc/go/setup.rscli/cache/check.rscli/tools/jupyter/install.rscli/lsp/lint.rscli/tools/pm/outdated/mod.rscli/tools/jupyter/mod.rscli/standalone/binary.rscli/lib/standalone/virtual_fs.rscli/graph_container.rscli/lsp/search.rscli/lsp/client.rscli/tools/doc.rscli/tools/publish/publish_order.rscli/tools/compile.rscli/util/file_watcher.rscli/tools/x.rscli/file_fetcher.rscli/tools/run/mod.rscli/lsp/code_lens.rscli/tools/clean.rscli/cache/cache_db.rscli/lib/util/result.rscli/tools/fmt.rscli/util/text_encoding.rscli/tools/lint/reporters.rsext/bundle/src/lib.rscli/lsp/npm.rscli/lsp/config.rscli/tools/pm/audit.rscli/cache/fast_check.rscli/tools/installer/mod.rsext/http/service.rscli/tools/serve.rscli/lsp/testing/server.rscli/tools/repl/session.rscli/util/fs.rscli/tools/publish/tar.rscli/lsp/analysis.rscli/tools/pm/deps.rscli/tools/check.rscli/lsp/path_to_regex.rscli/tools/coverage/reporter.rscli/tools/bundle/html.rscli/graph_util.rscli/tools/coverage/mod.rscli/lsp/testing/execution.rscli/lsp/urls.rscli/ops/jupyter.rscli/tools/bundle/esbuild.rscli/tools/deploy.rscli/tools/lint/linter.rscli/tools/repl/editor.rscli/tools/lint/rules/mod.rscli/tools/pm/approve_scripts.rscli/lsp/mod.rscli/rt/binary.rscli/tools/lint/plugins.rscli/task_runner.rscli/tools/task.rscli/cache/incremental.rscli/lsp/diagnostics.rscli/tools/publish/auth.rscli/npm.rscli/tools/bench/mod.rscli/main.rscli/lsp/testing/definitions.rscli/lsp/registries.rscli/tools/jupyter/server.rscli/util/display.rscli/lsp/repl.rscli/lsp/text.rscli/cache/node.rscli/module_loader.rscli/tools/publish/paths.rscli/tools/publish/mod.rscli/tools/info.rscli/cache/code_cache.rscli/registry.rscli/bench/main.rscli/tools/pm/cache_deps.rscli/factory.rscli/tools/bundle/provider.rscli/rt/code_cache.rscli/tools/publish/module_content.rscli/tools/lint/mod.rscli/lsp/documents.rscli/tools/installer/bin_name_resolver.rscli/util/extract.rscli/tools/repl/mod.rscli/args/mod.rscli/rt/main.rscli/tools/pm/mod.rscli/util/archive.rscli/rt/run.rscli/args/flags.rscli/tools/test/mod.rscli/tools/publish/graph.rscli/tools/publish/diagnostics.rscli/lsp/tsc.rscli/cache/module_info.rscli/lsp/language_server.rscli/tools/upgrade.rscli/lsp/jsr.rscli/tools/repl/channel.rs
cli/tools/**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
CLI tools should be implemented in
cli/tools/<tool>orcli/tools/<tool>/mod.rs
Files:
cli/tools/publish/provenance.rscli/tools/init/mod.rscli/tools/bundle/mod.rscli/tools/jupyter/install.rscli/tools/pm/outdated/mod.rscli/tools/jupyter/mod.rscli/tools/doc.rscli/tools/publish/publish_order.rscli/tools/compile.rscli/tools/x.rscli/tools/run/mod.rscli/tools/clean.rscli/tools/fmt.rscli/tools/lint/reporters.rscli/tools/pm/audit.rscli/tools/installer/mod.rscli/tools/serve.rscli/tools/repl/session.rscli/tools/publish/tar.rscli/tools/pm/deps.rscli/tools/check.rscli/tools/coverage/reporter.rscli/tools/bundle/html.rscli/tools/coverage/mod.rscli/tools/bundle/esbuild.rscli/tools/deploy.rscli/tools/lint/linter.rscli/tools/repl/editor.rscli/tools/lint/rules/mod.rscli/tools/pm/approve_scripts.rscli/tools/lint/plugins.rscli/tools/task.rscli/tools/publish/auth.rscli/tools/bench/mod.rscli/tools/jupyter/server.rscli/tools/publish/paths.rscli/tools/publish/mod.rscli/tools/info.rscli/tools/pm/cache_deps.rscli/tools/bundle/provider.rscli/tools/publish/module_content.rscli/tools/lint/mod.rscli/tools/installer/bin_name_resolver.rscli/tools/repl/mod.rscli/tools/pm/mod.rscli/tools/test/mod.rscli/tools/publish/graph.rscli/tools/publish/diagnostics.rscli/tools/upgrade.rscli/tools/repl/channel.rs
ext/**/lib.rs
📄 CodeRabbit inference engine (CLAUDE.md)
Extensions should provide ops (operations) exposed to JavaScript in Rust code within
ext/<extension_name>/directories
Files:
ext/bundle/src/lib.rs
cli/main.rs
📄 CodeRabbit inference engine (CLAUDE.md)
Main CLI entry point is in
cli/main.rsand should handle command routing
Files:
cli/main.rs
cli/module_loader.rs
📄 CodeRabbit inference engine (CLAUDE.md)
Module loading and resolution is handled in
cli/module_loader.rs
Files:
cli/module_loader.rs
cli/args/flags.rs
📄 CodeRabbit inference engine (CLAUDE.md)
CLI flag parsing should be defined in
cli/args/flags.rs
Files:
cli/args/flags.rs
🧠 Learnings (3)
📚 Learning: 2025-11-24T16:19:37.808Z
Learnt from: CR
Repo: denoland/deno PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:19:37.808Z
Learning: Applies to cli/module_loader.rs : Module loading and resolution is handled in `cli/module_loader.rs`
Applied to files:
cli/standalone/binary.rscli/graph_container.rscli/tools/serve.rscli/lsp/testing/server.rscli/lsp/analysis.rscli/lsp/repl.rscli/module_loader.rscli/tools/info.rscli/util/extract.rscli/rt/run.rs
📚 Learning: 2025-11-24T16:19:37.808Z
Learnt from: CR
Repo: denoland/deno PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:19:37.808Z
Learning: Applies to runtime/worker.rs : Worker and runtime initialization is implemented in `runtime/worker.rs`
Applied to files:
cli/tools/serve.rs
📚 Learning: 2025-11-24T16:19:37.808Z
Learnt from: CR
Repo: denoland/deno PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:19:37.808Z
Learning: Applies to cli/args/flags.rs : CLI flag parsing should be defined in `cli/args/flags.rs`
Applied to files:
cli/tools/check.rscli/args/flags.rs
🧬 Code graph analysis (8)
cli/tools/bundle/mod.rs (1)
runtime/worker.rs (1)
deno_core(1155-1155)
cli/tools/jupyter/mod.rs (1)
runtime/worker.rs (1)
deno_core(1155-1155)
cli/tools/doc.rs (1)
runtime/worker.rs (1)
deno_core(1155-1155)
ext/bundle/src/lib.rs (1)
runtime/worker.rs (1)
deno_core(1155-1155)
cli/tools/pm/deps.rs (1)
ext/telemetry/lib.rs (12)
deno_core(1294-1294)deno_core(1761-1761)deno_core(1787-1787)deno_core(1817-1817)deno_core(1845-1845)deno_core(1882-1882)deno_core(2202-2202)deno_core(2244-2244)deno_core(2294-2294)deno_core(2361-2361)deno_core(2396-2396)deno_core(2437-2437)
cli/task_runner.rs (1)
runtime/worker.rs (1)
deno_core(1155-1155)
cli/tools/publish/mod.rs (1)
ext/telemetry/lib.rs (12)
deno_core(1294-1294)deno_core(1761-1761)deno_core(1787-1787)deno_core(1817-1817)deno_core(1845-1845)deno_core(1882-1882)deno_core(2202-2202)deno_core(2244-2244)deno_core(2294-2294)deno_core(2361-2361)deno_core(2396-2396)deno_core(2437-2437)
cli/args/mod.rs (1)
runtime/worker.rs (1)
deno_core(1155-1155)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: test debug macos-aarch64
- GitHub Check: test debug windows-x86_64
- GitHub Check: test debug linux-aarch64
- GitHub Check: test debug macos-x86_64
- GitHub Check: lint debug windows-x86_64
- GitHub Check: test release linux-x86_64
- GitHub Check: test debug linux-x86_64
- GitHub Check: lint debug linux-x86_64
- GitHub Check: lint debug macos-x86_64
- GitHub Check: build libs
🔇 Additional comments (108)
cli/tools/jupyter/install.rs (1)
9-9: LGTM!Clean refactoring that aligns with the PR objective. The import change maintains the
AnyErroralias while sourcing it directly fromanyhow::Error, consistent with the otherdeno_core::anyhowimports already in the file.cli/tools/installer/bin_name_resolver.rs (1)
5-5: LGTM - Import refactor is correct.The change correctly updates the error type import to use
anyhow::Errordirectly while maintaining theAnyErroralias. This is consistent with the PR objective and has no functional impact.cli/util/extract.rs (1)
20-20: LGTM!The import path change is correct and maintains backward compatibility through aliasing. All existing usages of
AnyErrorthroughout the file remain unchanged.cli/tools/jupyter/server.rs (1)
16-16: LGTM - clean import refactor.The change correctly aliases
anyhow::ErrorasAnyError, maintaining compatibility with all existing usages in the file.cli/tools/init/mod.rs (1)
13-13: LGTM!The import path change is correct and preserves all existing usage of
AnyErrorthroughout the file. This aligns with the PR's objective to use the anyhow error type directly instead of through the deno_core error module alias.cli/tools/repl/session.rs (1)
26-27: This change is part of an intentional codebase-wide refactor (commit 5215ae9) migrating fromdeno_core::error::AnyErrortodeno_core::anyhow::Errordirectly. The systematic migration across multiple files confirms this is an approved architectural change in deno_core, not a risky swap. No further verification needed.cli/tools/x.rs (1)
11-11: LGTM – Clean refactor with no functional impact.The import path change from
deno_core::error::AnyErrortodeno_core::anyhow::Error as AnyErrormaintains the same alias name throughout the file, so all function signatures and error handling remain unchanged. This aligns with the codebase-wide refactor described in the PR.cli/util/text_encoding.rs (1)
9-9: LGTM!The import refactor is clean and maintains compatibility through aliasing.
cli/cache/module_info.rs (1)
7-7: LGTM - Clean import path refactoring.The switch from
deno_core::error::AnyErrortodeno_core::anyhow::Error as AnyErrormaintains the same alias while using the anyhow re-export directly. No functional changes.cli/tsc/go/setup.rs (1)
8-8: LGTM - Consistent with PR refactoring.Import path updated while preserving the
AnyErroralias. No changes to error handling logic.cli/tools/publish/mod.rs (1)
20-20: LGTM - Import refactoring applied correctly.The error type import path is updated consistently with the repository-wide refactoring. All existing
AnyErrorusages remain unchanged.cli/tools/publish/module_content.rs (1)
12-12: LGTM - Straightforward import update.Error type alias updated to use anyhow re-export directly. No impact on functionality.
cli/lsp/search.rs (1)
5-5: LGTM - Import path refactored correctly.The
AnyErroralias now points toanyhow::Errorvia deno_core's re-export. Trait definitions remain unchanged.cli/tools/publish/publish_order.rs (1)
9-9: LGTM - Clean refactoring.Import path updated while maintaining the
AnyErroralias. No functional impact.cli/tools/doc.rs (1)
11-11: LGTM - Import refactoring complete.Error type alias updated to use anyhow's
Errordirectly through deno_core. No changes to error handling logic or function signatures.cli/cache/incremental.rs (1)
7-7: LGTM - Import path updated correctly.The error type alias now references
anyhow::Errorvia deno_core's re-export. Cache functionality remains unchanged.cli/http_util.rs (1)
7-7: LGTM!Clean mechanical import update. The alias preserves API compatibility across the file.
cli/tools/bundle/mod.rs (1)
28-28: LGTM!Import path updated consistently. The file already uses
deno_core::anyhow::anyhow!directly elsewhere, so this aligns the error type sourcing.cli/tools/lint/linter.rs (1)
14-16: LGTM!Good alignment - now both
ContextandError(aliased asAnyError) come from the samedeno_core::anyhowmodule.cli/tools/pm/outdated/mod.rs (2)
10-11: LGTM!Consistent with the existing
bailimport from the same module.
555-557: LGTM!Nested
filtermodule now sources all anyhow-related imports (Context,Error as AnyError,anyhow) from the same path.cli/util/fs.rs (1)
14-16: LGTM!All anyhow-related imports (
Context,Error as AnyError,anyhow) now consistently sourced fromdeno_core::anyhow.cli/rt/run.rs (1)
21-21: Straightforward import swap; keepsResult<_, AnyError>intact.cli/lsp/testing/server.rs (1)
9-9: Looks good: LSP testing now uses the same anyhow-basedAnyError.cli/tools/lint/plugins.rs (1)
13-15: Nice alignment:AnyError+bail!now clearly come from the same anyhow lineage.cli/lsp/testing/execution.rs (1)
11-13: Good:AnyErrormatchesanyhow!(...)usage here.cli/graph_util.rs (1)
13-13: Import change is consistent with the PR goal; signatures remain the same.cli/util/archive.rs (1)
8-11: Good cleanup:Context/bail!andAnyErrorare now all fromdeno_core::anyhow.cli/task_runner.rs (1)
10-12: Looks right: keepsContext+AnyErrorconsistent and avoidsdeno_core::error::AnyError.cli/lib/util/result.rs (1)
9-9: Import migration is clean. No old error module imports remain, and theAnyErroralias is consistently applied across the codebase pointing toanyhow::Error. TheCoreErrordowncasts will work correctly since both types come from the samedeno_runtime::deno_corere-export.cli/file_fetcher.rs (1)
14-14: LGTM - Import path refactoring is correct.The change to use
deno_core::anyhow::Error as AnyErroris a straightforward refactoring that preserves the alias name, keeping all existing code compatible.cli/tools/bundle/provider.rs (1)
9-9: LGTM - Consistent with the error type refactoring.cli/lsp/lint.rs (1)
9-9: LGTM.cli/npm.rs (1)
10-10: LGTM.cli/module_loader.rs (1)
34-34: LGTM.cli/factory.rs (1)
14-14: LGTM.cli/cache/cache_db.rs (1)
8-8: LGTM.cli/tools/publish/provenance.rs (1)
13-13: LGTM.cli/tools/coverage/reporter.rs (1)
6-6: LGTM; no naming collision withstd::io::Error. Keeping the alias asAnyErroravoids clashing with the existinguse std::io::Error;.Also applies to: 12-12
cli/tools/check.rs (1)
5-5: Straightforward alias swap; looks fine.Also applies to: 14-18
cli/tools/pm/audit.rs (1)
6-8: Looks good; aligns withContextusage already coming fromdeno_core::anyhow.Also applies to: 29-33
cli/tools/publish/paths.rs (1)
12-12: LGTM; this file treatsAnyErrorpurely as aResulterror type.Also applies to: 232-235
cli/tools/serve.rs (1)
7-10: TheAnyError::fromconversions are idiomatic and should type-check fine. The code uses standard error handling withanyhow::Error, which has broadFromimplementations for common error types. Lines 131–133 properly map errors in thetry_join!call, and lines 108/166 consistently useInto::intofor worker results. No type-checking issues expected here.cli/tools/publish/graph.rs (1)
10-10: The import change is correct and matches the codebase standard.deno_core::anyhow::Error as AnyErroris used consistently throughout the entire project (100+ files follow this pattern), and no legacy imports remain. The file properly uses theAnyErroralias in its function signature.cli/tools/run/mod.rs (1)
9-11: Verified:AnyError::msg()call sites are compatible with theanyhow::Erroralias. Theanyhow::Error::msg()method exists and accepts Display + Debug + Send + Sync + 'static types. All five usages in this file (lines 352, 355, 362, 367, 369) passformat!()results or string literals, which satisfy the trait bounds. No conflictingAnyErrorimports found. The import alias change is safe.cli/tools/publish/diagnostics.rs (1)
21-21: LGTM - Clean import path update.The change from
deno_core::error::AnyErrortodeno_core::anyhow::Error as AnyErroris straightforward and maintains the existing API surface.cli/tools/pm/deps.rs (1)
14-14: LGTM - Consistent with repo-wide refactor.Import path updated correctly while preserving the
AnyErroralias.cli/standalone/binary.rs (1)
21-21: LGTM - Import path updated correctly.cli/graph_container.rs (1)
8-8: LGTM - Import updated correctly.cli/main.rs (1)
43-43: LGTM - Main entry point import updated correctly.cli/tools/jupyter/mod.rs (1)
6-6: LGTM - Import path updated correctly.cli/lib/standalone/virtual_fs.rs (1)
19-19: LGTM - Import path updated correctly.Note that this uses
deno_runtime::deno_core::anyhow::Errorwhich is appropriate given this file's import patterns (it consistently accesses deno_core through deno_runtime).cli/tools/repl/editor.rs (1)
15-15: LGTM - Import path updated correctly.cli/tools/pm/cache_deps.rs (1)
8-8: LGTM: import swap keeps theAnyErrorsurface while using the anyhow-backed type.
Only thing to double-check is thatdeno_core::anyhow::Erroris the intended stable re-export for this repo revision (so downstream crates don’t rely ondeno_core::error::AnyErrorspecifically).cli/tools/coverage/mod.rs (1)
17-18: Looks correct;AnyError::fromusage should still compile withanyhow::Error.
Recommend running a quickcargo check/ workspace build to ensure no modules depended ondeno_core::error::AnyErroras a distinct alias.Also applies to: 403-410
cli/tools/info.rs (1)
9-9: LGTM: consistent AnyError aliasing with the PR objective.
Please verify there’s no remaining mixed usage in this module (or feature-gated code) that expectsdeno_core::error::AnyError.cli/rt/binary.rs (1)
15-18: LGTM: alignsAnyErrorwithdeno_core::anyhow::Error, and the existingContext/bail!patterns still match.
Just ensure CI covers all targets here (esp. the Windows#[cfg(windows)]paths) since this file is pretty platform-sensitive.cli/tools/clean.rs (1)
12-16: LGTM: alias swap is consistent, including theurl_to_pathcallback signature.
Worth verifying there’s no type inference edge-case where the older alias path mattered (should be unlikely, but easy to confirm viacargo check).Also applies to: 422-427
cli/tools/compile.rs (1)
12-16: LGTM: this file already leans heavily on anyhow patterns, so the alias change is especially clean here.
Please verify the workspace still compiles with the targetdeno_corerevision that exposesdeno_core::anyhow::Error.cli/lsp/testing/definitions.rs (1)
3-5: LGTM: simple alias swap; return type staysResult<_, AnyError>.
As a sanity check, ensure no other LSP testing modules still importdeno_core::error::AnyError(avoid churn / mixed patterns).Also applies to: 147-157
cli/cache/check.rs (1)
3-5: LGTM: error type resolution change should be transparent for these DB helper results.
Please verify the?conversions still behave the same in this crate (they should, but this is dependency/API-surface territory).Also applies to: 57-65
cli/tools/upgrade.rs (1)
18-18: LGTM! Clean import path update.The change from
deno_core::error::AnyErrortodeno_core::anyhow::Error as AnyErrormaintains the same alias and type, ensuring no impact on function signatures or runtime behavior.cli/tools/bundle/html.rs (1)
11-11: LGTM! Consistent refactor.Import path correctly updated to use
deno_core::anyhow::Error as AnyError.cli/tools/installer/mod.rs (1)
20-20: LGTM! Error type alias updated correctly.The import path change aligns with the project-wide refactor to use anyhow::Error directly.
cli/tools/lint/rules/mod.rs (1)
10-10: LGTM! Import update applied correctly.cli/tools/lint/mod.rs (1)
21-21: LGTM! Error import path updated.cli/tools/deploy.rs (1)
6-6: LGTM! Clean refactor.cli/lsp/urls.rs (1)
10-10: LGTM! Import path correctly updated.cli/cache/fast_check.rs (1)
3-3: LGTM! Final import path update.All files in this review consistently apply the refactor from
deno_core::error::AnyErrortodeno_core::anyhow::Error as AnyError. The changes are clean and maintain API compatibility.cli/tools/repl/mod.rs (1)
7-7: Import swap looks consistent with the PR goal; just verify the re-export is stable.
This is a straightforward alias change and should remain source-compatible here. Please confirmdeno_core::anyhow::Erroris the intended long-term re-export (and that no feature-gating affects it) by running a localcargo check.cli/rt/code_cache.rs (1)
12-14: LGTM; alias keeps signatures intact, andbail!stays in the same module.
Nothing else in this file appears sensitive to the concrete error type, but this still depends ondeno_core::anyhowre-exportingErrorconsistently—please verify viacargo check.cli/tools/lint/reporters.rs (1)
4-6: Looks safe; please double-check JS error downcasting still behaves as expected.
js_error_downcast_ref(err)should still work if errors are being stored inanyhow::Errorconsistently, but since this is a cross-crate type-source change, verify withcargo test -p deno_cli lint(or at leastcargo check).cli/tools/publish/tar.rs (1)
7-9: No issues;Context+Error as AnyErrorcombo is coherent.
Given this relies ondeno_core::anyhowre-exports, please validate withcargo check(and ideally a publish-related test run).cli/util/file_watcher.rs (1)
13-18: Change is fine; recommend a quick watch-mode smoke test because errors are user-facing.
Even if this is “just” an import swap, the displayed formatting ({err:?}) and JS error downcast path are UX-critical—please runcargo checkplus a minimaldeno run --watchsmoke test.cli/cache/node.rs (1)
3-4: LGTM;ensure_ok(Result<_, AnyError>)remains source-compatible.
Since this shifts the concreteAnyErrororigin, please verify withcargo test -p deno_cli cache::node(or nearest suite) /cargo check.cli/cache/code_cache.rs (1)
4-6: Looks good; just verify the trait boundary still compiles cleanly.
Because this is a trait-impl boundary usingResult<_, AnyError>internally, please confirm withcargo check/ targeted tests to ensure no hidden type alias mismatch occurs across crates.cli/lsp/tsc.rs (1)
27-29: Import swap is consistent; please run LSP-related checks because this file is a big fan-out.
This module sendsAnyErroracross channels/threads and uses it pervasively; even though it’s intended to be equivalent, this is the place where any alias mismatch will hurt most—please verify withcargo check+ whatever LSP/tsc test suite you normally run.cli/tools/fmt.rs (1)
27-27: LGTM - Clean refactor to anyhow-based error typeThe import change correctly aliases
deno_core::anyhow::ErrorasAnyError, maintaining compatibility with all existing usages in the file. No functional changes.cli/tools/pm/mod.rs (1)
10-10: LGTM - Consistent with repo-wide error type standardizationThe import change maintains the
AnyErroralias while switching to the anyhow-based implementation. All existingResult<_, AnyError>types continue to work without modification.cli/tools/bench/mod.rs (1)
11-11: LGTM - Error type import updated correctlyThe change aligns with the project-wide shift to anyhow-based error handling while preserving the
AnyErroralias for backward compatibility.cli/tools/publish/auth.rs (1)
6-6: LGTM - Auth module error handling updatedImport path correctly updated to use anyhow-based error type. Function signatures using
Result<_, AnyError>remain unchanged.cli/ops/jupyter.rs (1)
12-12: LGTM - Jupyter ops error handling alignedImport correctly updated. The
JupyterBroadcastError::ZeroMqvariant continues to useAnyError, which now resolves to the anyhow-based type without breaking the public API.cli/tools/repl/channel.rs (1)
5-5: LGTM - REPL channel error handling updatedThe import change is consistent with the broader refactor. All
Result<_, AnyError>usages continue to work as expected.cli/util/display.rs (1)
5-5: LGTM - Display utilities error handling standardizedImport path updated correctly. The
write_json_to_stdoutfunction signature remains unchanged while benefiting from the anyhow-based error type.cli/tools/test/mod.rs (1)
34-34: LGTM - Test infrastructure error handling alignedThe import change correctly updates to anyhow-based error handling while preserving the
AnyErroralias. The separate imports foranyhowmacro (line 33, 35) are correctly maintained for error construction throughout the test infrastructure.ext/http/service.rs (1)
808-808: Test signature update looks correct; keeps error handling flexible.
Switching the test toResult<(), deno_core::anyhow::Error>should keep?ergonomics unchanged.cli/lsp/repl.rs (1)
8-10: Alias change is clean; call sites should behave the same.cli/lsp/client.rs (1)
6-9: Good migration step; alignsAnyErrorwithanyhow!/bail!usage.cli/lsp/diagnostics.rs (1)
10-13: Import update is consistent;AnyError::fromcall sites should continue to work.cli/rt/main.rs (1)
7-8: Import swap seems safe forunwrap_or_exitand keeps error plumbing simple.ext/bundle/src/lib.rs (1)
8-45: Trait + default impl now consistently usedeno_core::anyhowerror types.cli/lsp/config.rs (1)
26-29: Clean alias change; matches the file’s existinganyhow!usage.cli/args/mod.rs (1)
36-36: Import migration is complete and consistent. No olddeno_core::error::AnyErrorimports remain in the repository. The newAnyErroralias fromdeno_core::anyhow::Erroris used consistently throughout the file in all function signatures.cli/lsp/text.rs (1)
1-4: No issues with theAnyErrorimport and error handling. The alias correctly points todeno_core::anyhow::Error, andself.inner.offset()already returns the matching error type, so conversions work cleanly.cli/lsp/language_server.rs (1)
21-25: The import change is safe. No stray references to the olddeno_core::error::AnyErrorpattern exist anywhere in the codebase, and the new aliasuse deno_core::anyhow::Error as AnyErroron line 22 is properly in place. Error conversions in the file (Result<_, AnyError>return types) will work correctly with this alias since it directly points toanyhow::Error, the underlying error type that supports the?operator conversions.cli/lsp/jsr.rs (1)
7-10: LGTM.deno_core::anyhowis consistently re-exported across the entire codebase without feature gating. This import pattern is used throughout cli/lsp/ and other modules.cli/lsp/code_lens.rs (1)
14-16: No issues with this import change. The code already usesdeno_core::anyhow::Error as AnyErrorand it compiles fine. Since deno_core re-exports anyhow, both the old and new import paths resolve to the same type. The change is safe;AnyErroris only used internally in function return types, not in public API signatures.cli/lsp/npm.rs (1)
5-9: Reconsider usingdeno_core::error::AnyErrorinstead of re-aliasingdeno_core::anyhow::Error.The code imports
deno_core::anyhow::Error as AnyError, but deno_core's error module (deno_core::error::AnyError) is the documented stable public type. Aliasing the raw anyhow export diverges from the recommended pattern and may create confusion for maintainers.deno_core::error::AnyErroris not deprecated and remains the preferred downstream error type.cli/args/flags.rs (1)
40-43: Import swap looks correct; please confirm alias equivalence acrossdeno_coreversions. The localAnyErrorname is preserved, so this should be safe as long asdeno_core::anyhow::Erroris always available (no cfg/feature gating) and matches the olddeno_core::error::AnyErrorsemantics.cli/lsp/registries.rs (1)
10-12: Looks good: consistent AnyError aliasing viadeno_core::anyhow::Error.
This should stay behavior-neutral while aligning with the PR goal.cli/lsp/documents.rs (1)
21-26: Import swap is fine; keep an eye on type identity across crate boundaries.
If anything depends on the concrete pathdeno_core::error::AnyError(vs the alias), it’ll show up as trait-bound/From impl compile errors.cli/lsp/path_to_regex.rs (1)
34-36: LGTM: alignsAnyErrorwithanyhow!usage in this module.cli/tools/pm/approve_scripts.rs (1)
10-14: Good change: makes the file’s error type match its anyhow-style APIs.cli/lsp/analysis.rs (1)
14-18: LGTM: consistent with the repo-wide AnyError migration.cli/tools/bundle/esbuild.rs (1)
6-9: Good: error type now matches the anyhow-based control flow here (Context,bail!).cli/lsp/mod.rs (1)
3-3: LGTM: keepsstart()signature stable while switching the backing error type.Also applies to: 42-42
cli/bench/main.rs (1)
16-16: Looks good: the localResult<T>alias stays consistent with the updated AnyError import.Also applies to: 492-492
cli/registry.rs (1)
3-3: LGTM - Clean refactor to use anyhow::Error directly.The import change is correct. Since
deno_core::error::AnyErroris already a type alias foranyhow::Error, this just uses the underlying type directly. No behavior changes, and the usage at line 141 remains compatible.
| use deno_core::anyhow::Context; | ||
| use deno_core::anyhow::Error as AnyError; | ||
| use deno_core::anyhow::bail; | ||
| use deno_core::error::AnyError; |
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.
I actually preferred AnyError because it was clear.
Towards https://github.com/denoland/deno_core/blob/2898ad965ab1b5c616c9b6738b0b7ae046653320/core/error.rs#L29