Skip to content

bug(forge bind): does not set serde as dependency when using serde derives #10359

Open
@Brando753

Description

@Brando753

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

Commit SHA: e988893

What version of Foundryup are you on?

foundryup: 1.0.1

What command(s) is the bug in?

forge bind --alloy-version 0.13.0

Operating System

Linux

Describe the bug

I wanted to have serializable rust bindings, so I ran the latest nightly version but noticed that the bindings generated wouldn't compile without manually adding serde as a dependency to the Cargo.toml file of the generated crate. The issue #10317, along with the associated PR #10332 added serializable/deserializable derive traits to all types; however, it does not add the dependency to the Cargo file if the bindings are being built with serde derives. The cargo file should have something like this added automatically:

serde = { version = "1.0.219", features = ["derive"] }

Otherwise, you have to modify the generated crate manually after every run to get it to build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions