golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

Subdirectories are not listed when using an import path comment #576

Open arp242 opened 6 years ago

arp242 commented 6 years ago

https://godoc.org/github.com/carpetsmoker/test doesn't list all the subdirectories (there should be a, b, and c), only a, which I manually visited at https://godoc.org/github.com/carpetsmoker/test/a

It doesn't list b either, even though that is referenced in https://github.com/carpetsmoker/test

It seems to work as expected if I don't add an import path comment:

package a // import "github.com/carpetsmoker/a"

Note that this is probably not related to the recent change in #560; I had the same issue with arp242.net/sconfig last year (which I fixed by manually loading all the packages, I didn't investigate in detail back then). It also has the same problem again with a new directory I added handlers/html/template (which doesn't show up).

Related issues: #529, #268

dmitshur commented 6 years ago

I'm seeing a, b, and c at https://godoc.org/github.com/carpetsmoker/test now.

It's expected that subdirectories might take a while to show up, even if referenced by other code. They show up when the crawler gets around to the new repository. They show up immediately when visited directly.

arp242 commented 6 years ago

Hm, not sure why those show now.

I have several examples that are not being updated at all though; for example:

dmitshur commented 6 years ago

It's possible the crawler can't navigate the subdirectories because the GitHub canonical case doesn't match the import path comment (just a hypothesis; I haven't verified). As a workaround, you can explicitly visit the doc page for packages that are missing to get them to show up.

https://arp242.net/sconfig/handlers/html/template is 404, which is why docs for that package cannot be fetched.