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

Use restricted Damerau-Levenshtein algorithm #11963

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Use restricted Damerau-Levenshtein algorithm #11963

merged 2 commits into from
Apr 14, 2023

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Apr 12, 2023

This uses the same implementation as the one used in rustc, so review should be simple. As with rust-lang/rust#108200, the module and function names have been changed to be implementation-agnostic.

Reference for rustc's current implementation.

@rustbot
Copy link
Collaborator

rustbot commented Apr 12, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added A-dependency-resolution Area: dependency resolution and the resolver A-workspaces Area: workspaces Command-clean S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2023
src/cargo/core/workspace.rs Outdated Show resolved Hide resolved
@jhpratt
Copy link
Member Author

jhpratt commented Apr 12, 2023

I've split the commit into two and changed the remaining instances of the specific name (the one you caught and one I missed).

Assuming CI passes again, this should be good to go.

@epage
Copy link
Contributor

epage commented Apr 14, 2023

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 14, 2023

📌 Commit ccd77a3 has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 14, 2023
@bors
Copy link
Collaborator

bors commented Apr 14, 2023

⌛ Testing commit ccd77a3 with merge d2e7cfb...

@bors
Copy link
Collaborator

bors commented Apr 14, 2023

☀️ Test successful - checks-actions
Approved by: epage
Pushing d2e7cfb to master...

@bors bors merged commit d2e7cfb into rust-lang:master Apr 14, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2023
…ehuss

Make cargo a workspace

8 commits in 7bf43f028ba5eb1f4d70d271c2546c38512c9875..39116ccc9b420a883a98a960f0597f9cf87414b8
2023-04-10 16:01:41 +0000 to 2023-04-15 20:24:15 +0000

- Make cargo a workspace (rust-lang/cargo#11851)
- Fix flaky not_found_permutations test. (rust-lang/cargo#11976)
- Use restricted Damerau-Levenshtein algorithm (rust-lang/cargo#11963)
- Correct the bug report for `cargo clippy --fix` (rust-lang/cargo#11882)
- Stabilize `cargo logout` (rust-lang/cargo#11950)
- Add more information to HTTP errors to help with debugging. (rust-lang/cargo#11878)
- Use registry.default for login/logout (rust-lang/cargo#11949)
- Change -C to be unstable (rust-lang/cargo#11960)

---

### What does this PR try to resolve?

Making cargo a workspace.

Why doing this?

* `rustc-workspace-hack` is primarily for sharing dependencies between rls and cargo, as rls previously depends on cargo. After rls retired, it is no longer the case sharing dependencies.
* It's q bit painful that cargo needs to deal with some dependency and licensing complexities. For example, rust-lang#108665 failed because of the interaction bewteen `windows-sys` and `raw-dylib`. It currenctly blocks cargo's feature `-Zgitxodie` from moving forward.
* See rust-lang/cargo#11851

### Benchmark result

I've done a simple benchmark on both keeping or removing entire `rustc-workspace-hack`. It had no significant difference. Both took ~2m30s to finish `./x.py build -j8 src/tools/cargo src/tools/rls src/tools/clippy src/tools/miri src/tools/rustfmt`. Environment info:

```
host: aarch64-apple-darwin
os: Mac OS 13.2.1 [64-bit]
```

A sophisticated benchmark may be needed.

### Additional information

This depends on prior works from `@Muscraft` and `@ehuss.` Credits to them!
@ehuss ehuss added this to the 1.71.0 milestone Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependency-resolution Area: dependency resolution and the resolver A-workspaces Area: workspaces Command-clean S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants