Skip to content
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

Account for unicode confusables on typoed identifiers #66849

Closed
wants to merge 1 commit into from

Conversation

estebank
Copy link
Contributor

When a name can't be matched to any existing identifier, we look for
identifiers that have the same "skeleton" for possible suggestions,
instead of relying only on Levenshtein distance.

CC #55467

When a name can't be matched to any existing identifier, we look for
identifiers that have the same "skeleton" for possible suggestions,
instead of relying only on Levenshtein distance.
@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 28, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-28T20:20:18.8449914Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-28T20:20:19.6355285Z ##[command]git config gc.auto 0
2019-11-28T20:20:19.6359648Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-28T20:20:19.6362460Z ##[command]git config --get-all http.proxy
2019-11-28T20:20:19.6366105Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66849/merge:refs/remotes/pull/66849/merge
---
2019-11-28T20:26:20.7713112Z Found 0 error codes with no tests
2019-11-28T20:26:20.7713161Z Done!
2019-11-28T20:26:20.7713186Z 
2019-11-28T20:26:20.7713208Z 
2019-11-28T20:26:20.7714386Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-11-28T20:26:20.7714483Z 
2019-11-28T20:26:20.7714698Z 
2019-11-28T20:26:20.7720224Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-11-28T20:26:20.7721071Z Build completed unsuccessfully in 0:01:26
2019-11-28T20:26:20.7721071Z Build completed unsuccessfully in 0:01:26
2019-11-28T20:26:20.7779100Z == clock drift check ==
2019-11-28T20:26:20.7790556Z   local time: Thu Nov 28 20:26:20 UTC 2019
2019-11-28T20:26:21.0557976Z   network time: Thu, 28 Nov 2019 20:26:21 GMT
2019-11-28T20:26:21.0562178Z == end clock drift check ==
2019-11-28T20:26:22.3577804Z 
2019-11-28T20:26:22.3692610Z ##[error]Bash exited with code '1'.
2019-11-28T20:26:22.3724553Z ##[section]Starting: Checkout
2019-11-28T20:26:22.3726804Z ==============================================================================
2019-11-28T20:26:22.3726862Z Task         : Get sources
2019-11-28T20:26:22.3726911Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@the8472
Copy link
Member

the8472 commented Nov 28, 2019

Would it make sense to compute the distance over skeletons instead of looking either at the regular distance or the exact skeleton match?

@estebank
Copy link
Contributor Author

@the8472 that's a good idea.

@petrochenkov
Copy link
Contributor

Tidy fails because the new crates.io dependencies are not whitelisted.
Not sure what is the exact policy here, at minimum the license compatibility for the new crates need to be checked.

@petrochenkov
Copy link
Contributor

Would it make sense to compute the distance over skeletons instead of looking either at the regular distance or the exact skeleton match?

+1

Also, it looks like it can be an implementation details of find_best_match_for_name not leaking to its users.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 30, 2019
@bors
Copy link
Contributor

bors commented Dec 3, 2019

☔ The latest upstream changes (presumably #66997) made this pull request unmergeable. Please resolve the merge conflicts.

@joelpalmer
Copy link

Ping from Triage: any updates @estebank?

@joelpalmer joelpalmer added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 6, 2020
@joelpalmer
Copy link

Ping from Triage: Closing due to inactivity. Please re-open with updates. Thanks! @estebank

@joelpalmer joelpalmer closed this Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants