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

bug(soldeer): forge clean command makes Foundry crash frequently #9667

Open
2 tasks done
Misbah-Engr opened this issue Jan 11, 2025 · 5 comments
Open
2 tasks done

bug(soldeer): forge clean command makes Foundry crash frequently #9667

Misbah-Engr opened this issue Jan 11, 2025 · 5 comments
Labels
A-dependencies Area: dependencies T-bug Type: bug

Comments

@Misbah-Engr
Copy link

Misbah-Engr commented Jan 11, 2025

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.3.0 (3ba3d5f 2024-12-24T14:12:22.220751400Z)

What command(s) is the bug in?

Forge clean

Operating System

Windows

Describe the bug

The application panicked (crashed).
Message:  failed to extract foundry config:
foundry config error: data did not match any variant of untagged enum SoldeerDependencyValue for setting `dependencies.forge-std`

Location: crates/config/src/lib.rs:630

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

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 7 frames hidden ⋮
   8: core::panicking::panic_display::h2a303b1ddbc590db
      at <unknown source file>:<unknown line>
   9: foundry_config::Config::from_provider::{{closure}}::panic_cold_display::h836f2f0768093b28
      at <unknown source file>:<unknown line>
  10: foundry_config::Config::from_provider::h0bb1b3a972c42c07
      at <unknown source file>:<unknown line>
  11: foundry_config::Config::load_with_root::h48006686094fec1e
      at <unknown source file>:<unknown line>
  12: foundry_config::utils::load_config_with_root::ha51ccabc31531832
      at <unknown source file>:<unknown line>
  13: forge::main::hf4d07804f35029d9
      at <unknown source file>:<unknown line>
  14: std::sys::backtrace::__rust_begin_short_backtrace::h3a857313651447fb
      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.
Run with RUST_BACKTRACE=full to include source snippets.
Aborted (core dumped)
@Misbah-Engr Misbah-Engr added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Jan 11, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 11, 2025
@mattsse
Copy link
Member

mattsse commented Jan 11, 2025

@mario-eth

@Misbah-Engr could you please share your soldeer deps section

@Misbah-Engr
Copy link
Author

[dependencies]
forge-std = { git = "https://github.com/foundry-rs/forge-std", tag = "v1.6.0" }
openzeppelin-contracts = { path = "lib/openzeppelin-contracts" }
openzeppelin-contracts-upgradeable = { path = "lib/openzeppelin-contracts-upgradeable" }

@mattsse
Copy link
Member

mattsse commented Jan 11, 2025

@mario-eth looks like path/git values are unsupported

we def need to improve the error handling here by manually impl deserde for

#[serde(untagged)]
pub enum SoldeerDependencyValue {
Map(MapDependency),
Str(String),
}

@mario-eth
Copy link
Contributor

hey @Misbah-Engr
Soldeer does not have accepts path currently which should accept a dependency from a local directory.
Meanwhile you can just delete those and just put them in the remappings, basically mappings
openzeppelin-contracts=lib/openzeppelin-contracts

@zerosnacks zerosnacks changed the title Forge clean command makes Foundry crash frequently bug(soldeer): forge clean command makes Foundry crash frequently Jan 13, 2025
@zerosnacks zerosnacks added A-dependencies Area: dependencies and removed T-needs-triage Type: this issue needs to be labelled labels Jan 13, 2025
@Misbah-Engr
Copy link
Author

Misbah-Engr commented Jan 13, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: dependencies T-bug Type: bug
Projects
Status: Todo
Development

No branches or pull requests

4 participants