Skip to content
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

forge build panics if its cwd is deleted #7311

Closed
2 tasks done
coventry opened this issue Mar 5, 2024 · 1 comment
Closed
2 tasks done

forge build panics if its cwd is deleted #7311

coventry opened this issue Mar 5, 2024 · 1 comment
Labels
T-bug Type: bug

Comments

@coventry
Copy link

coventry commented Mar 5, 2024

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

orge 0.2.0 (3dfa43b 2024-03-05T00:16:30.030728431Z)

What command(s) is the bug in?

forge build

Operating System

Linux

Describe the bug

I think a git rebase resulted in my working directory being deleted and recreated. As a result the working directory of the shell in which I was invoking forge no longer existed. I believe this was probably the cause of the follow panic, since the problem cleared out when I cd'd into the new version of the directory.

$ forge build
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Location: crates/cli/src/opts/build/paths.rs:71

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 8 frames hidden ⋮                               
   9: foundry_cli::opts::build::paths::ProjectPathsArgs::project_root::h0d35ce0bac3ea3af
      at <unknown source file>:<unknown line>
  10: foundry_cli::opts::build::core::<impl core::convert::From<&foundry_cli::opts::build::core::CoreBuildArgs> for figment::figment::Figment>::from::h1c731a6eb5390b0b
      at <unknown source file>:<unknown line>
  11: forge::cmd::build::<impl core::convert::From<&forge::cmd::build::BuildArgs> for figment::figment::Figment>::from::had6ef32764553ac8
      at <unknown source file>:<unknown line>
  12: forge::cmd::build::BuildArgs::run::h1011cd9e1ed7fa3f
      at <unknown source file>:<unknown line>
  13: forge::main::h1615b0a2bc432be4
      at <unknown source file>:<unknown line>
  14: std::sys_common::backtrace::__rust_begin_short_backtrace::h86c1532f67008196
      at <unknown source file>:<unknown line>
  15: main<unknown>
      at <unknown source file>:<unknown line>
  16: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
  17: _start<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Aborted (core dumped)
@coventry coventry added the T-bug Type: bug label Mar 5, 2024
@DaniPopes
Copy link
Member

DaniPopes commented May 24, 2024

This is a highly non-standard situation, and I don't know of any program that would handle this correctly

@DaniPopes DaniPopes closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

2 participants