dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

Search doesn't work for package:test

Open jamesderlin opened this issue 3 years ago • 1 comments

Attempting to search from the search box from https://pub.dev/documentation/test/latest/ seems to match mostly only the library names.

Even after navigating to a particular library, search won't work for names listed in that document. For example, if I go to https://pub.dev/documentation/test/latest/expect/expect-library.html and then try searching for throwsA, there are no results, even though throwsA is listed as part of the expect library.

This is particularly bad for package:test since package:test exports several other packages (and is the typical way that people consume those), there's been a history of stuff being moved around, and I can never remember which library owns the thing I'm looking for.

jamesderlin avatar Apr 29 '22 19:04 jamesderlin

This is super strange. search was overhauled recently, but I don't think it's been pushed to pub. I'll keep an eye on this.

srawlins avatar Sep 28 '22 00:09 srawlins

This is going to persist even with the search changes. I believe this is happening because package:test simply exports APIs from other packages, so dartdoc as ran by pub.dev doesn't see those elements as local, therefore it doesn't generate documentation for them, instead it cross-links to those package's own pub.dev documentation. This ends up with them not being added to the indexable list of items which is currently done alongside generation.

I guess search indexing would need to be separated from doc generation and take in account those externally linked packages.

parlough avatar Dec 04 '22 09:12 parlough

I think that this seems to be working now.

jamesderlin avatar Aug 03 '23 22:08 jamesderlin