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 clean command makes Foundry crash frequently #9667

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

Forge clean command makes Foundry crash frequently #9667

Misbah-Engr opened this issue Jan 11, 2025 · 4 comments
Labels
T-bug Type: bug T-needs-triage Type: this issue needs to be labelled

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 :
9: foundry_config::Config::from_provider::{{closure}}::panic_cold_display::h836f2f0768093b28
at :
10: foundry_config::Config::from_provider::h0bb1b3a972c42c07
at :
11: foundry_config::Config::load_with_root::h48006686094fec1e
at :
12: foundry_config::utils::load_config_with_root::ha51ccabc31531832
at :
13: forge::main::hf4d07804f35029d9
at :
14: std::sys::backtrace::__rust_begin_short_backtrace::h3a857313651447fb
at :
15: main
at :
16: __libc_start_main
at :
17: _start
at :

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug T-needs-triage Type: this issue needs to be labelled
Projects
Status: Todo
Development

No branches or pull requests

3 participants