-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tracking Issue for tracked access to environment variables from proc macros #74690
Comments
This seems really useful, what would it take to stabilize it? Also, this function should be mentioned in the docs for |
Some user experience I guess? |
one alternative that might be more useful is to instead add tracking to |
This function need to wired into the compiler to affect depinfo files. |
In #84029 (comment) @Xanewok has some concerns about the module structure. |
Closing this in favor of this tracking issue, tracking both |
#74653 introduces
proc_macro::tracked_env::var
- a new function that is similar to regularenv::var
called from a proc macro, except that it also adds the accessed variable to depinfo.This way build system executing the compiler will know that the variable was accessed during compilation, and will be able to rerun the build when the value of that variable changes.
Besides the dependency tracking
tracked_env::var
differs fromenv::var
from the standard library by requiring UTF-8 arguments.See some discussion in #71858 for the motivation, non UTF-8 variables were considered unimportant corner cases by the stakeholders, and tracking for them can be introduced later with new depinfo directives like
# env-dep-bytes
.The text was updated successfully, but these errors were encountered: