Skip to content

Workspace auto inherit fields draft#1

Open
Googleton wants to merge 10 commits into
masterfrom
workspace_auto_inherit_fields
Open

Workspace auto inherit fields draft#1
Googleton wants to merge 10 commits into
masterfrom
workspace_auto_inherit_fields

Conversation

@Googleton

Copy link
Copy Markdown
Owner

Draft for rust-lang#10870

dcaba and others added 10 commits July 19, 2022 14:48
docs: fixing minor error in the default timing report filename

### What does this PR try to resolve?

Minor documentation fix, as I accidentally realized that the timings build report filename is not plural.
refactor(source): Open query API for adding more types of queries

### What does this PR try to resolve?

This refactors the Source/Registry traits from accepting a `fuzzy: bool` to accepting an enum so we can add alternative query styles in the future, as discussed in the Cargo team meeting for fixing rust-lang#10729

The expected fix for `cargo add` at this point would be
- Add `QueryKind::Normalized`
  - Initially, we can make it like Exact for path sources and like Fuzzy for registry sources
- Switch cargo-add to using that kind everywhere (both where `Exact` and `Fuzzy` are used)
- A test to ensure this fixed it
- Rename `Fuzzy` to `Alternatives` or something to clarify its actual intent

### How should we test and review this PR?

The refactor is broken down into multiple commits, so ideally review a commit at a time to more easily see how it evolved.

### Additional information

Future possibilities
- Supporting normalized search on all sources
- Doing version / source matching for normalized results (probably not needed for cargo-add but will make the API less surprising for future users)
Fix typo in unstable docs: s/PROGJCT/PROJECT/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants