-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
unstable proc_macro tracked::* rename/restructure #87173
base: master
Are you sure you want to change the base?
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
I'm going to transfer this to the libs API team. I'm not sure what the current library conventions are, but seeing >2 segment paths like use tracked::fs::path as track_path;
use tracked::env::var as tracked_env_var;
fn my_proc_macro() {
track_path("my_file.txt"); // returns nothing
let var = tracked_env_var("MY_VAR"); // returns the variable's value
} |
Totally understandable, and I don't have a strong opinion, mostly going off of what was discussed in the referenced #84029 issue. If it is at odds with the current naming and module nesting depth, feel free to close. At the very least though, I think it should be unified to either |
We discussed this in today's @rust-lang/libs-api meeting. We don't want to see an extra level of submodule nesting here; we should just have Also, separate from this issue, several people in the meeting felt that we shouldn't restrict |
@m-ou-se I'll implement the required changes this week, just wasn't entirely sure what your self assignment implied. |
Shouldn't we name the functions |
I'd prefer the one module level variants, which is in line with other macro impls iirc:
|
What's meant by |
Pending access to something that can be cast to a byte slice, the impl currently accepts valid UTF-8 only. I am not sure the error handling is as desired. Either way, I'd like some feedback :) Thanks! @rustbot label -S-waiting-on-author +S-waiting-on-review |
It's not necessary to return a I'm not sure whether proc macro bridge can support passing |
Technically this would be possible, but that would require to access the currently private I added an implementation adding a |
Ping from triage: |
☔ The latest upstream changes (presumably #99058) made this pull request unmergeable. Please resolve the merge conflicts. |
@drahnr any updates on this pr? |
@Dylan-DPC If everything goes well, I can take another look at splitting things up next week~ish according along with #87173 (comment) and drop the remaining changes. I frankly forgot about the issue. |
@drahnr any updates on this? |
Back on it. |
0c57e65
to
a46a7ba
Compare
Some changes occurred in src/tools/rust-analyzer cc @rust-lang/rust-analyzer |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
7b4ac2f
to
fa67588
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #118646) made this pull request unmergeable. Please resolve the merge conflicts. |
What's left on this? |
A review, and another rebase, I think. It's been a while. |
Extracted restructure of the unstable
tracked::{fs,env}::*
Originally part of #84029
It's slightly clunky to to have three distinct unstable features, since one cannot use two annotations on one
mod tracked {..}
declaration.The second thing I am unsure is
rust-analyzer
which would need some adaption for the new structure.CC @Xanewok