Skip to content
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

x/tools/cmd/godoc: directory listings aren't updated #3386

Closed
gopherbot opened this issue Mar 24, 2012 · 17 comments

Comments

Projects
None yet
7 participants
@gopherbot
Copy link

commented Mar 24, 2012

by trolleriprofessorn:

The current godoc server (baeb068aac25+ tip) generates directory listings on startup and
don't update them on reload. This is inconvenient when you use the server to browse the
documentation of your project during development.

If it's not possible to address this before the Go 1 release, I suggest making the
-timestamps flag true by default. This will help new users discover the behavior and
experienced users can easily turn timestamps off.
@robpike

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2012

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Owner changed to @griesemer.

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 2:

Labels changed: added go1.1maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Mar 12, 2013

Comment 4:

[The time for maybe has passed.]

Labels changed: removed go1.1maybe.

@adg

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2013

Comment 5:

Labels changed: added godoc.

@mewmew

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2013

Comment 6:

Using the fsnotify package (go.exp/fsnotify) to solve this issue is probably the
preferred way. If so issue #4068 should be marked as a blocker for this issue.
@rsc

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2013

Comment 7:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 8:

Labels changed: added release-none, removed go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 9:

Labels changed: added repo-tools.

@griesemer

This comment has been minimized.

Copy link
Contributor

commented Jan 9, 2014

Comment 10:

Owner changed to bgarcia@golang.org.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Jan 13, 2014

Comment 11 by bgarcia@golang.org:

I see that Corpus.RunIndexer() should periodically update the index.
https://code.google.com/p/go/source/browse/godoc/index.go?repo=tools#1477
But digging a little deeper, I find that it will only reindex after
Corpus.invalidateIndex is called.  And that is only called once, from Corpus.Init.  So
it would seem that the infinite loop within Corpus.RunIndexer will do something once, at
startup, but then never do anything again.
Is there another code path that I'm missing?  How do people feel about re-indexing
unconditionally every Corpus.IndexInterval?
@mewmew

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2014

Comment 12:

I think the plan is to use fsnotify to solve this issue. The proposal is located at:
https://docs.google.com/document/d/1xl_aRcCbksFRmCKtoyRQG9L7j6DIdMZtrkFAoi5EXaA/edit?pli=1
@gopherbot

This comment has been minimized.

Copy link
Author

commented Jan 13, 2014

Comment 13 by bgarcia@google.com:

In the meantime, it appears that the Corpus.RunIndexer loop serves no purpose.  We
should either exit that loop after updating the index, or just periodically re-index
unconditionally.
Or, does that loop serve another purpose that I'm just not seeing?
@gopherbot

This comment has been minimized.

Copy link
Author

commented Jan 13, 2014

Comment 14 by bgarcia@golang.org:

In the meantime, it appears that the Corpus.RunIndexer loop serves no purpose.  We
should either exit that loop after updating the index, or just periodically re-index
unconditionally.
Or, does that loop serve another purpose that I'm just not seeing?
@gopherbot

This comment has been minimized.

Copy link
Author

commented Jan 28, 2014

Comment 15 by bgarcia@golang.org:

Short-term fix has been submitted:
https://code.google.com/p/go/source/detail?r=2e2c0a636a58&repo=tools
This will unconditionally re-index periodically.
Leaving this issue unresolved for a permanent fix that makes use of fsnotify when it's
ready.

Labels changed: added release-go1.3maybe, removed release-none.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2014

Comment 16:

Labels changed: added suggested, removed release-go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2014

Comment 17:

Labels changed: added release-none.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc changed the title cmd/godoc: directory listings aren't updated x/tools/cmd/godoc: directory listings aren't updated Apr 14, 2015

@rsc rsc removed the repo-tools label Apr 14, 2015

@agnivade

This comment has been minimized.

Copy link
Member

commented Apr 12, 2018

This was decided in #7524 that it is enough to be able to tune the index interval to have enough control to change the update frequency. Mentioning here for reference -

@andybons- Another alternative--though I'm not saying it's a good one--is to allow a flag to specify how often to index or to disable reindexing entirely. It's unclear what's better here. Whether to add yet another flag or increase the complexity of the code by adding inotify watches.

@agnivade- It is already behind a flag called "index", which is false by default. And the index_interval is also behind a flag (default of 5 mins).

@andybons- Then let’s close this. If it comes up again we can revisit.

Hence, closing this.

@agnivade agnivade closed this Apr 12, 2018

@golang golang locked and limited conversation to collaborators Apr 12, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.