-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(forge)Add options to forge bind to define crate description and license #6993
base: master
Are you sure you want to change the base?
feat(forge)Add options to forge bind to define crate description and license #6993
Conversation
crates/forge/bin/cmd/bind.rs
Outdated
if let Some(description) = &self.crate_description { | ||
writeln!(cargo_toml, "description = {:?}", description) | ||
.wrap_err("Failed to write description to Cargo.toml")?; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not that easy because this will append the description to the end of the file.
I think we want this just under the rust-version
version field
I don't think we want to fix this in ethers, but I think we can just find the first empty line in the cargo.toml and put the description and license in there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty for your review,
this is not that easy because this will append the description to the end of the file. I think we want this just under the
rust-version
version field I don't think we want to fix this in ethers, but I think we can just find the first empty line in the cargo.toml and put the description and license in there
so if i understand well what you means, i need to put those value just after rust-version, right ?
[package]
name = "project"
version = "0.1.0"
edition = "2021
rust-version = "1.75"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what if the cargo.tmol doesn't contain the rust-version field, should i return error like "rust-version not found in Cargo.toml"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okey so i'm trying to found rus(version in the cargo file but if it doesn't found the rust version, it fail. Is that what we are trying to do here?
cc @mattsse |
This is failing because it does not found rust-version or rust.version.workspace |
Closes #6844