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

Use compile-time macro env! #350

Merged
merged 4 commits into from
Oct 20, 2024
Merged

Use compile-time macro env! #350

merged 4 commits into from
Oct 20, 2024

Conversation

fox0
Copy link
Contributor

@fox0 fox0 commented Oct 20, 2024

No description provided.

@jgarzik jgarzik merged commit 28ccf7e into rustcoreutils:main Oct 20, 2024
2 checks passed
@andrewliebenow
Copy link
Contributor

I know this is already merged, but it would have been nice to make a macro that calls env!("PROJECT_NAME"), so that constant didn't have to be repeated everywhere.

@jgarzik
Copy link
Contributor

jgarzik commented Oct 20, 2024

I know this is already merged, but it would have been nice to make a macro that calls env!("PROJECT_NAME"), so that constant didn't have to be repeated everywhere.

This is a special case. Many of the CLI utils only need plib for dev-dependencies if this one constant is moved to an env var. Creating a macro would [re-]introduce an unwanted crate dependency.

Ideal for a posixutils util is only rust-std, and zero plib dependencies.

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.

3 participants