Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
075bf5b
Replace bun_core::Error intern machinery with per-crate thiserror enums
robobun Jul 10, 2026
7d431be
fixpoint: repair Write trait impls and spawn_sys/io return types
robobun Jul 10, 2026
51d66d1
fixpoint: rewrite remaining bun_core::Error type references to crate:…
robobun Jul 10, 2026
5c816eb
fixpoint: js_parser/js_printer/spawn compile
robobun Jul 10, 2026
75d88fd
fixpoint: bulk bun_core::Error→crate::Error + crash_handler/http/sour…
robobun Jul 10, 2026
f0331fd
fixpoint: resolver compiles
robobun Jul 10, 2026
8f71395
fixpoint: bun_bundler compiles
robobun Jul 10, 2026
03d52ec
fixpoint: standalone_graph/bunfig compile; add ErrName impl to all er…
robobun Jul 10, 2026
b9116c4
fixpoint: bun_install compiles
robobun Jul 10, 2026
48c99c9
fixpoint: bun_jsc round 1
robobun Jul 10, 2026
00536cd
fixpoint: bun_jsc compiles; Errorable takes ErrorCode directly
robobun Jul 10, 2026
546d1ca
fixpoint: bun_jsc + *_jsc tier compile
robobun Jul 10, 2026
f373fef
fixpoint: bun_runtime round 1 (823→60)
robobun Jul 10, 2026
6b730e0
fixpoint: bun_runtime compiles; cargo check --workspace green on linu…
robobun Jul 10, 2026
e30d47d
fixpoint: rust:check-all green across all 10 targets
robobun Jul 10, 2026
7cae7d3
docs: update src/CLAUDE.md and remove stale err!/.bun_err comment
robobun Jul 10, 2026
0359da9
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 10, 2026
aa776b9
test: pin user-visible error name/code/message strings across the ref…
robobun Jul 10, 2026
d305af2
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 10, 2026
856b4c1
review: restore errno routing; delete errno_to_zig_err stub and add b…
robobun Jul 10, 2026
beee7ef
fix: ABI mismatch in extern "Rust" link-time functions causing stack-…
robobun Jul 10, 2026
9fb20a3
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 10, 2026
a9624ea
fix: dispatch on .name() where errors arrive nested via #[from] wrappers
robobun Jul 10, 2026
0ee765a
shrink + fix CI: remove &'static str variants, fix Blob unreachable, …
robobun Jul 10, 2026
48ec811
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 10, 2026
5e228a2
clippy: allow trivially_copy_pass_by_ref on Error::name; auto-fix use…
robobun Jul 10, 2026
60cd3c9
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 10, 2026
4385117
fix: handle_root_error takes impl ErrName directly; no lossy From<run…
robobun Jul 10, 2026
2a51cc9
resume: rebase onto main + fix four CI-blocking review findings
robobun Jul 10, 2026
964b858
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 10, 2026
ce9fc95
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Jul 10, 2026
1ba6b87
fix: last two CI failures (03830 macro error message, resolve.test.ts…
robobun Jul 10, 2026
013fbb2
fix: runtime::Error::Js(OutOfMemory).name() returns OutOfMemory not J…
robobun Jul 10, 2026
3a1d186
ci: retrigger
robobun Jul 11, 2026
c799145
fix: auto_installer map_err also unwraps Resolver(Sys(errno))
robobun Jul 11, 2026
be365c8
rebase + dead-code cleanup per review
robobun Jul 11, 2026
2edfd7c
fix: AsyncModule::on_done JSError dispatch also matches Bundler(Js(_))
robobun Jul 11, 2026
be52741
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 44 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Conventions:
- `cargo check -p <crate>` for fast iteration; `bun bd` builds and links everything.
- Don't `.unwrap()` a fallible path that user input or the OS can hit at runtime — return the error. `.unwrap()` is for invariants you can prove.
- The C ABI / syscall boundary uses `bun_sys::Maybe<T>` (= `Result<T, bun_sys::Error>`); ordinary Rust code uses `Result<T, E>` with `?`.
- `bun_core::Error` is a lightweight interned `NonZeroU16` error code; `bun_sys::Error` is the rich syscall error (errno + syscall tag + path). `From<bun_sys::Error> for bun_core::Error` exists.
- Each crate defines its own `Error` enum (a `thiserror::Error` at `<crate>/error.rs`, re-exported as `crate::Error` + `crate::Result`). Errno codes nest via `Sys(#[from] bun_errno::SystemErrno)`; OOM via `Alloc(#[from] bun_alloc::AllocError)`. `bun_sys::Error` is the rich syscall error (errno + syscall tag + path); `From<bun_sys::Error> for bun_errno::SystemErrno` exists for `?`-chaining.
- NEVER add comments to deleted code blocks.
- Do not add comments that reference context from the transcript.
- Avoid adding comments where not necessary.
Expand Down
2 changes: 2 additions & 0 deletions src/analytics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ bitflags.workspace = true
bun_core.workspace = true
bun_semver.workspace = true
bun_sys.workspace = true
thiserror.workspace = true
bun_errno.workspace = true
29 changes: 29 additions & 0 deletions src/analytics/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
pub enum Error {
#[error("Unexpected")]
Unexpected,
#[error("EOF")]
EOF,

#[error(transparent)]
Sys(#[from] bun_errno::SystemErrno),
}

impl Error {
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn name(&self) -> &'static str {
match self {
Self::Sys(e) => <&'static str>::from(e),
Self::Unexpected => "Unexpected",
Self::EOF => "EOF",
}
}
}

impl bun_core::output::ErrName for Error {
fn name(&self) -> &[u8] {
(*self).name().as_bytes()
}
}

pub type Result<T, E = Error> = core::result::Result<T, E>;
3 changes: 3 additions & 0 deletions src/analytics/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,6 @@ pub use generate_header as GenerateHeader;

pub mod schema;
pub use schema::{BufReader, Reader, SchemaInt};

pub mod error;
pub use error::{Error, Result};
Loading
Loading