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

Fix global search #46175

Merged
merged 1 commit into from Nov 28, 2017

Conversation

Projects
None yet
6 participants
@GuillaumeGomez
Member

GuillaumeGomez commented Nov 21, 2017

Fixes #46021.

r? @QuietMisdreavus

@GuillaumeGomez GuillaumeGomez changed the title from Fix global search to [WIP] Fix global search Nov 21, 2017

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Nov 21, 2017

Member

Seems like it messes with generics.

Member

GuillaumeGomez commented Nov 21, 2017

Seems like it messes with generics.

@GuillaumeGomez GuillaumeGomez changed the title from [WIP] Fix global search to Fix global search Nov 21, 2017

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Nov 21, 2017

Member

Ok, generics are working again. Added comments to avoid removing the same code again.

Member

GuillaumeGomez commented Nov 21, 2017

Ok, generics are working again. Added comments to avoid removing the same code again.

} else {
return MAX_LEV_DISTANCE + 1;
}
}
return lev_distance;
return lev_distance;//Math.ceil(total / done);

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Nov 22, 2017

Member

I'm still wondering if I should return the lowest lev distance or if I should return the average lev value... Any preference?

@GuillaumeGomez

GuillaumeGomez Nov 22, 2017

Member

I'm still wondering if I should return the lowest lev distance or if I should return the average lev value... Any preference?

This comment has been minimized.

@QuietMisdreavus

QuietMisdreavus Nov 27, 2017

Member

I can see how returning the average would be better, but i'm not sure how effective it will be. A user would need to search for something with multiple generics (which i'm not sure works right now? a search for Result<File, Error> returns a lot of bad lev results before any of the functions that return that type show up) before the difference will even show up. I think we can leave this as-is for now and investigate it in the future.

@QuietMisdreavus

QuietMisdreavus Nov 27, 2017

Member

I can see how returning the average would be better, but i'm not sure how effective it will be. A user would need to search for something with multiple generics (which i'm not sure works right now? a search for Result<File, Error> returns a lot of bad lev results before any of the functions that return that type show up) before the difference will even show up. I think we can leave this as-is for now and investigate it in the future.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Nov 28, 2017

Member

I'll leave the comment just in case then if you don't mind.

@GuillaumeGomez

GuillaumeGomez Nov 28, 2017

Member

I'll leave the comment just in case then if you don't mind.

@@ -374,7 +375,7 @@
var valLower = query.query.toLowerCase(),
val = valLower,
typeFilter = itemTypeFromName(query.type),
results = {},
results = {}, results_in_args = {}, results_returned = {},

This comment has been minimized.

@Havvy

Havvy Nov 25, 2017

Contributor

Not really an issue with this PR, but I don't like how there's inconsistent var styles being used with some functions having one var per line, and others using commas like they're going out of style.

@Havvy

Havvy Nov 25, 2017

Contributor

Not really an issue with this PR, but I don't like how there's inconsistent var styles being used with some functions having one var per line, and others using commas like they're going out of style.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Nov 25, 2017

Member

I grouped them by "theme". But if you want I can put each on a line.

@GuillaumeGomez

GuillaumeGomez Nov 25, 2017

Member

I grouped them by "theme". But if you want I can put each on a line.

Show outdated Hide outdated src/librustdoc/html/static/main.js Outdated
Show outdated Hide outdated src/librustdoc/html/static/main.js Outdated
Show outdated Hide outdated src/librustdoc/html/static/main.js Outdated
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 25, 2017

Contributor

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

Contributor

bors commented Nov 25, 2017

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

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Nov 26, 2017

Member

Rebased.

Member

GuillaumeGomez commented Nov 26, 2017

Rebased.

@QuietMisdreavus

This comment has been minimized.

Show comment
Hide comment
@QuietMisdreavus
Member

QuietMisdreavus commented Nov 27, 2017

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 27, 2017

Contributor

📌 Commit 0a12198 has been approved by QuietMisdreavus

Contributor

bors commented Nov 27, 2017

📌 Commit 0a12198 has been approved by QuietMisdreavus

@kennytm

This comment has been minimized.

Show comment
Hide comment
@kennytm

kennytm Nov 27, 2017

Member

I suggest we backport this (and possibly #46081 also) to 1.23-beta, as search is broken on beta as well.

Member

kennytm commented Nov 27, 2017

I suggest we backport this (and possibly #46081 also) to 1.23-beta, as search is broken on beta as well.

@QuietMisdreavus

This comment has been minimized.

Show comment
Hide comment
@QuietMisdreavus

QuietMisdreavus Nov 27, 2017

Member

I agree - if possible, i'd rather not break the search for docs that show up on stable.

Member

QuietMisdreavus commented Nov 27, 2017

I agree - if possible, i'd rather not break the search for docs that show up on stable.

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Nov 28, 2017

Member

Let's move up the priority then.

@bors: p=10

Member

GuillaumeGomez commented Nov 28, 2017

Let's move up the priority then.

@bors: p=10

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 28, 2017

Contributor

⌛️ Testing commit 0a12198 with merge 3bde5e7...

Contributor

bors commented Nov 28, 2017

⌛️ Testing commit 0a12198 with merge 3bde5e7...

bors added a commit that referenced this pull request Nov 28, 2017

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 28, 2017

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: QuietMisdreavus
Pushing 3bde5e7 to master...

Contributor

bors commented Nov 28, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: QuietMisdreavus
Pushing 3bde5e7 to master...

@bors bors merged commit 0a12198 into rust-lang:master Nov 28, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:fix-global-search branch Nov 28, 2017

bors added a commit that referenced this pull request Dec 23, 2017

Auto merge of #46886 - durka:doc-search-backports, r=GuillaumeGomez
[beta] Doc search backports

This is a backport of #46081, #46175, #46433, and #46672. They all merged cleanly but I haven't tried a build; let's see what Travis says.

These PRs fix pretty annoying issues with doc search and so I think it's important they don't slip to stable, but these PRs have *NOT* been `beta-accepted` yet.

cc @steveklabnik @GuillaumeGomez can you tag the docs team to talk about beta-acceptance?
@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Jan 10, 2018

Member

Looks like we forgot to backport this to 1.23.0 (sorry about that!) so removing beta tags

Member

alexcrichton commented Jan 10, 2018

Looks like we forgot to backport this to 1.23.0 (sorry about that!) so removing beta tags

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Jan 10, 2018

Member

Er sorry looks like this was backported in #46886

Member

alexcrichton commented Jan 10, 2018

Er sorry looks like this was backported in #46886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment