Commit Graph

6 Commits

Author SHA1 Message Date
zeripath
c32f3da33c
Handle panic in indexer initialisation better (#10534)
* Handle panic in indexer initialisation better
* as per @guillep2k
2020-02-28 22:00:09 +00:00
Lauris BH
3c45cf8494
Add detected file language to code search (#10256)
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00
Lunny Xiao
8b2f29c0d2
fix datarace on issue indexer queue (#9490) 2019-12-25 17:44:09 +08:00
zeripath
30181d459d Wrap the code indexer (#9476)
* Wrap the code indexer

In order to prevent a data race in the code indexer it must be wrapped
with a holder otherwise it is possible to Search/Index on an
incompletely initialised indexer, and search will fail with a nil
pointer until the repository indexer is initialised.

Further a completely initialised repository indexer should not be closed
until Termination otherwise actions in Hammer/Shutdown phases could
block or be lost.

Finally, there is a complex dance of shutdown etiquette should the index
initialisation fail. This PR restores that.

* Always return err if closed whilst waiting

Co-authored-by: techknowlogick <matti@mdranta.net>
2019-12-24 15:26:34 +08:00
Lunny Xiao
89b4e0477b
Refactor code indexer (#9313)
* Refactor code indexer

* fix test

* fix test

* refactor code indexer

* fix import

* improve code

* fix typo

* fix test and make code clean

* fix lint
2019-12-23 20:31:16 +08:00
Lunny Xiao
50da9f7dae Move modules/indexer to modules/indexer/code (#9301) 2019-12-10 14:29:40 +01:00