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

Remove const_format dependency #13496

Open
DaniPopes opened this issue Dec 22, 2024 · 4 comments · May be fixed by #13504
Open

Remove const_format dependency #13496

DaniPopes opened this issue Dec 22, 2024 · 4 comments · May be fixed by #13504
Labels
C-debt Refactor of code section that is hard to understand or maintain D-good-first-issue Nice and easy! A great choice to get started

Comments

@DaniPopes
Copy link
Member

DaniPopes commented Dec 22, 2024

Describe the feature

Its only usage is when formatting version specifiers, e.g.

pub const VERGEN_GIT_SHA: &str = const_format::str_index!(VERGEN_GIT_SHA_LONG, ..8);

We can move this logic into the build script which makes it more readable and removes the dependency.

This practically means replacing the const_format calls with env!("NAME"), and moving the formatting logic to build.rs with println!("cargo:rustc-env=NAME={value}")

Additional context

No response

@DaniPopes DaniPopes added C-debt Refactor of code section that is hard to understand or maintain D-good-first-issue Nice and easy! A great choice to get started labels Dec 22, 2024
@stevencartavia
Copy link
Contributor

🙋🏽‍♂️

@duvbell duvbell linked a pull request Dec 22, 2024 that will close this issue
@aniketch07
Copy link

Is this issue still available?

@ekumamatthew
Copy link

Would love to tackle this!

@mattsse
Copy link
Collaborator

mattsse commented Dec 24, 2024

this will be completed in #13504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt Refactor of code section that is hard to understand or maintain D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

5 participants