Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Standard library packages not being returned for simple queries #508

Closed
myitcv opened this issue Aug 29, 2017 · 6 comments
Closed

Standard library packages not being returned for simple queries #508

myitcv opened this issue Aug 29, 2017 · 6 comments

Comments

@myitcv
Copy link
Member

myitcv commented Aug 29, 2017

Picking up on #505 (comment) I'm still seeing issues where a search query with the term that is the path.Base of a standard library package import path fails to return the standard library package in the list of results.

For example the query for math:

https://godoc.org/?q=math

screen shot 2017-08-29 at 18 41 48

Doesn't appear on the entire results page, let alone near the top

This was also the case for strings and os (as reported in #505 (comment)) but they now appear to be fixed (thanks @shantuo).

Doing a quick analysis of the Go 1.9 standard library, the following packages appear to suffer from this problem:

List compiled using script:

for i in $(go list std | grep -v internal | grep -v ^vendor\/)
do
        b=$(basename $i)
        r=$(curl -s --fail https://godoc.org/?q=$b | pup "table[class=\"table table-condensed\"] tbody tr td a[href=\"/$i\"] text{}")
        d=0
        if [ "$r" == "" ]
        then
                echo "* $i (https://godoc.org/?q=$b)"
        fi
done

I'm fairly certain that something has changed here?

Thanks

@myitcv
Copy link
Member Author

myitcv commented Aug 29, 2017

Updated script and list above... and in that time math appears to have fixed itself... which is strange.

@shantuo
Copy link
Contributor

shantuo commented Aug 29, 2017

These packages are suppressed from the search result page because of the previous bug #504, I guess they are still in queue to be updated. I manually refreshed package math and it shows up now. I can try to manually bump the crawl of these packages.

@myitcv
Copy link
Member Author

myitcv commented Aug 29, 2017

Thanks @shantuo

@shantuo
Copy link
Contributor

shantuo commented Aug 29, 2017

Some works now, there are a few (net/http, crypto/rand ...) still not working because gddo cannot generate the doc due to some "unrecognized import path" error. Perhaps something is wrong with the build environment/deployment.

@dmitshur
Copy link
Contributor

dmitshur commented Aug 29, 2017

From https://godoc.org/net/http:

The go get command cannot install this package because of the following issues:

  • Unrecognized import path "golang_org/x/net/proxy" (transport.go:32:2)
  • Unrecognized import path "golang_org/x/net/idna" (h2_bundle.go:47:2)
  • Unrecognized import path "golang_org/x/net/http2/hpack" (h2_bundle.go:46:2)
  • Unrecognized import path "golang_org/x/net/lex/httplex" (server.go:31:2)

Those are vendored packages:

https://github.com/golang/go/tree/master/src/vendor/golang_org/x/net

Perhaps the cause is that gddo doesn't support finding vendored packages (this is a guess, it might be something else).

@shantuo
Copy link
Contributor

shantuo commented Aug 29, 2017

The vendored packages should be there after the std lib list was updated. There must be some other bug.

gopherbot pushed a commit that referenced this issue Aug 30, 2017
update #508

Change-Id: I7c65e901cd42c5731ae62b16e4baa84d08d3b432
Reviewed-on: https://go-review.googlesource.com/60110
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
@shantuo shantuo closed this as completed Jan 30, 2018
@myitcv myitcv mentioned this issue Mar 14, 2019
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants