You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few people in the Rust PR and on Reddit mentioned that the provider and name are a little confusing. They both need to follow identifier rules, but they don't actually relate to any value in the surrounding code. Compare that to the arguments which do have to be valid expressions.
It's pretty trivial to tweak this, but I want to be sure I'm actually making it better first. The best option I've thought of so far, with some similarity to how tools use them, is to separate provider and name with a colon, like:
I ran into a similar issue in rust-lang/rfcs#875 (comment). This manifests particularly in eBPF where the provider name is expected to match the name of the binary (bpftrace/bpftrace#328 (comment)). That's sort of hard when binaries often contain -, whereas Rust identifiers aren't allowed to. There are ways to work around that (bpftrace/bpftrace#413), but it'd be nicer if we could just directly specify the appropriate provider name.
The current syntax is:
A few people in the Rust PR and on Reddit mentioned that the provider and name are a little confusing. They both need to follow identifier rules, but they don't actually relate to any value in the surrounding code. Compare that to the arguments which do have to be valid expressions.
It's pretty trivial to tweak this, but I want to be sure I'm actually making it better first. The best option I've thought of so far, with some similarity to how tools use them, is to separate provider and name with a colon, like:
This way they still look like bare identifiers, but there's a visual cue that something unusual is going on.
The text was updated successfully, but these errors were encountered: