Uh oh!
There was an error while loading. Please reload this page.
Normalize ident - #66670
Conversation
rust-highfive
commented
Nov 23, 2019
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
crlf0710
commented
Nov 23, 2019
r? @estebank |
rust-highfive
commented
Nov 23, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Uh oh!
There was an error while loading. Please reload this page.
Centril
commented
Nov 23, 2019
cc @Manishearth |
Manishearth
left a comment
There was a problem hiding this comment.
lgtm from a unicode standpoint
hopefully there are no other places where we create Symbols?
Centril
commented
Nov 23, 2019
cc @petrochenkov re. Symbols |
912227a to
0e3036bComparecrlf0710
commented
Nov 23, 2019
At least there's one in the |
estebank
commented
Nov 25, 2019
@Manishearth shouldn't we have a warning when encountering non-NFC chars? Shouldn't we, for the sake of third party tools, attempt to "soft-enforce" byte comparable tokens? These questions might are possibly unrelated to this PR in particular and I should have brought up this point in the mega-thread. |
estebank
commented
Nov 25, 2019
The PR LGTM, but I can foresee issues cropping up when involving macros. |
Manishearth
commented
Nov 25, 2019
@estebank no, non-NFC chars appear for all kinds of reasons |
estebank
commented
Nov 26, 2019
@bors try @rust-timer queue |
rust-timer
commented
Nov 26, 2019
Awaiting bors try build completion |
bors
commented
Nov 26, 2019
Normalize ident Perform unicode normalization on identifiers. Resolving the first bullet point in #55467.
bors
commented
Nov 26, 2019
☀️ Try build successful - checks-azure |
rust-timer
commented
Nov 26, 2019
Queued ce0c4f6 with parent a44774c, future comparison URL. |
crlf0710
commented
Nov 28, 2019
Mmm, is the timer task still queued? |
crlf0710
commented
Nov 29, 2019
@bors try @rust-timer queue |
bors
commented
Nov 29, 2019
@crlf0710: 🔑 Insufficient privileges: not in try users |
rust-timer
commented
Nov 29, 2019
Insufficient permissions to issue commands to rust-timer. |
Dylan-DPC-zz
commented
Dec 11, 2019
@bors try @rust-timer queue |
rust-timer
commented
Dec 11, 2019
Awaiting bors try build completion |
bors
commented
Dec 11, 2019
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message |
49f3bc9 to
27e7a1bCompareRebased and added dependency according to @Mark-Simulacrum 's instruction. @estebank |
Dylan-DPC-zz
commented
Dec 26, 2019
@bors r+ |
bors
commented
Dec 26, 2019
📌 Commit 27e7a1b has been approved by |
bors
commented
Dec 26, 2019
Normalize ident Perform unicode normalization on identifiers. Resolving the first bullet point in #55467.
bors
commented
Dec 26, 2019
☀️ Test successful - checks-azure |
petrochenkov
commented
Dec 28, 2019
I have two questions / concerns:
|
crlf0710
commented
Dec 28, 2019
Following the RFC, since we're using NFC normalization, I think the answer to the first question is "no it's not possible". NFC normalization is basically reordering and regrouping, so nothing really disappears. |
crlf0710
commented
Dec 28, 2019
For the second question, i think that's a question for a potential "shepherd" for RFC 2457, currently we don't have one, but it would be best if there is one. cc #55467 In my personal opinion though, i think it's not too wrong to gate at the AST after macro expansion, since macros and procedure macros can generate new identifiers, and need to be gated too. I basically know nothing about the |
crlf0710
commented
Dec 28, 2019
And by the way i believe there're some remaining work on performing this normalization to the user data sent to
I think I need some mentor here. @petrochenkov could you give some instructions when you have time? I tried to read the code in |
petrochenkov
commented
Dec 29, 2019
@crlf0710 It's emitted twice in So, the normalization (and also gating, arguably) needs to happen in the same places. |
crlf0710
commented
Dec 29, 2019
@petrochenkov do you mean https://github.com/rust-lang/rust/blob/master/src/libsyntax_expand/proc_macro_server.rs#L330 ? I'm a little confused. After normalization, if the identifier changes, should i intern, get a new |
petrochenkov
commented
Dec 29, 2019
@crlf0710 |
crlf0710
commented
Dec 29, 2019
Great, let me create a branch and PR it. |
By the way, the RFC says the normalization is performed during parsing rather than lexing. On the other hand, if the normalization is performed during lexing, that would be the first case in which we do not preserve original tokens by design (except for a big hack with doc comments in macros). |
…henkov Add symbol normalization for proc_macro_server. Follow up for rust-lang#66670, finishing the first bullet point in rust-lang#55467. r? @petrochenkov
Perform unicode normalization on identifiers. Resolving the first bullet point in #55467.