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

feat(forge)Add options to forge bind to define crate description and license #6993

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

DoTheBestToGetTheBest
Copy link
Contributor

@DoTheBestToGetTheBest DoTheBestToGetTheBest commented Feb 1, 2024

Closes #6844

Comment on lines 247 to 250
if let Some(description) = &self.crate_description {
writeln!(cargo_toml, "description = {:?}", description)
.wrap_err("Failed to write description to Cargo.toml")?;
}
Copy link
Member

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

Copy link
Contributor Author

@DoTheBestToGetTheBest DoTheBestToGetTheBest Feb 2, 2024

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"

Copy link
Contributor Author

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"

Copy link
Contributor Author

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?

@DoTheBestToGetTheBest
Copy link
Contributor Author

cc @mattsse

@DoTheBestToGetTheBest
Copy link
Contributor Author

This is failing because it does not found rust-version or rust.version.workspace

@zerosnacks zerosnacks self-assigned this Jul 2, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 31, 2024
@zerosnacks zerosnacks added the C-forge Command: forge label Jul 31, 2024
@zerosnacks zerosnacks removed their assignment Jul 31, 2024
@zerosnacks zerosnacks added the Cmd-forge-bind Command: forge bind label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-bind Command: forge bind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add options to forge bind to define crate description and license
3 participants