oven-sh/bun · error

TODO windows

Error message

TODO windows

What it means

OutputFile copying uses openat + copy on POSIX, but the Windows implementation was never written; reaching the `#[cfg(windows)]` arm panics with this placeholder. It means the output-file copy feature was invoked on Windows and hit unimplemented code, not an OS error.

Solutions

  1. Avoid the bundler code path that copies output files (e.g. don't use features that require file copying) on Windows
  2. Implement the Windows branch using CopyFileW / paths as the TODO comment suggests
  3. Report the missing bundler feature on Windows upstream if you hit it
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/bundler/OutputFile.rs:307 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/8860701f5babb3d4. Report an issue: GitHub.

Appendix: source

Thrown at src/bundler/OutputFile.rs:307

        let fd_out = bun_sys::openat(
            dir,
            resolve_path::z(rel_path, &mut out_buf),
            bun_sys::O::WRONLY | bun_sys::O::CREAT | bun_sys::O::TRUNC,
            0o644,
        )?;
        let mut in_buf = PathBuffer::uninit();
        let fd_in = bun_sys::openat(
            Fd::cwd(),
            resolve_path::z(self.src_path.text, &mut in_buf),
            bun_sys::O::RDONLY,
            0,
        )?;

        #[cfg(windows)]
        {
            let _ = (fd_out, fd_in);
            // use paths instead of bun.getFdPathW()
            panic!("TODO windows");
        }
        #[cfg(not(windows))]
        {
            bun_sys::copy_file(fd_in, fd_out)?;
            Ok(())
        }
    }
}

// `to_js` / `to_blob` are extension-trait methods that
// live in `bun_bundler_jsc`; the base type carries no jsc reference.

View on GitHub (pinned to 8c5296ac45)