-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Proposal
Add a new --env VAR=VALUE
option which injects environment variables into the program, allowing them to be read by the env!
and option_env!
macros and from proc_macro_tracked_env
.
An initial implementation (not merged) was done in rust-lang/rust#94387.
Mentors or Reviewers
@bjorn3 and @jyn514 were the ones who reviewed the original PR so at least tagging them here as potential mentors/reviewers.
Process
The main points of the Major Change Process are as follows:
- File an issue describing the proposal.A compiler team member or contributor who is knowledgeable in the area can second by writing
@rustbot second
.- Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a
-C flag
, then full team check-off is required. - Compiler team members can initiate a check-off via
@rfcbot fcp merge
on either the MCP or the PR.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
Activity
rustbot commentedon Jul 13, 2023
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
cc @rust-lang/compiler @rust-lang/compiler-contributors
oli-obk commentedon Jul 13, 2023
@rustbot second
jyn514 commentedon Jul 13, 2023
I want to raise a concern that this doesn't support proc-macros in practice.
dtolnay commentedon Jul 21, 2023
Prior art: rust-lang/rfcs#2794
jsgf commentedon Jul 23, 2023
Yeah very in favour of this, but it needs to have a way to also remove all process-environment variables, so that you can entirely specify the logical environment on the command line.
GuillaumeGomez commentedon Jul 24, 2023
Your RFC seems more complete. Any idea why it was not approved yet?
jsgf commentedon Jul 26, 2023
It just needs to be driven. There are no objections, but I don't think it's got much attention. I'm happy to take it up again, esp if we have multiple independent use-cases for the functionality.
jsgf commentedon Jul 28, 2023
I updated my impl in https://github.com/jsgf/rust/tree/env-sandbox
apiraino commentedon Oct 2, 2023
@rustbot label -final-comment-period +major-change-accepted
19 remaining items