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

chore(version) Remove const_format dependency #13504

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

duvbell
Copy link

@duvbell duvbell commented Dec 22, 2024

Closes #13496

@duvbell
Copy link
Author

duvbell commented Dec 23, 2024

hello @DaniPopes , can you help me review this PR ?

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good,
let's also remove the const_format dep now?

@DaniPopes
Copy link
Member

DaniPopes commented Dec 24, 2024

few notes

  • BUILD_PROFILE_NAME can be replaced by emitting env::var("PROFILE");
  • LONG_VERSION has multiple lines which you have to emit individually, like for (i, line) in .lines().enumerate() { /*emit "LONG_VERSION{i}"*/ }, because cargo does not support multiline environment variables

@duvbell duvbell requested a review from gakonst as a code owner December 24, 2024 13:14
@duvbell
Copy link
Author

duvbell commented Dec 24, 2024

@DaniPopes tks, i updated the code regarding your comment

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending @DaniPopes

@@ -22,10 +22,68 @@ fn main() -> Result<(), Box<dyn Error>> {
// if not on a tag: v0.2.0-beta.3-82-g1939939b
// if on a tag: v0.2.0-beta.3
let not_on_tag = env::var("VERGEN_GIT_DESCRIBE")?.ends_with(&format!("-g{sha_short}"));
let is_dev = is_dirty || not_on_tag;
println!("cargo:rustc-env=RETH_VERSION_SUFFIX={}", if is_dev { "-dev" } else { "" });
let version_suffix = if is_dirty || not_on_tag { "-dev" } else { "" };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, I noticed that some docker builds have a -dev suffix, which doesn't make sense, so I think this is kinda wrong

wouldn't be opposed to removing this entirely @onbjerg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove const_format dependency
3 participants