7 ms·
Are there any open source powerful code search engines out there? As a Googler the internal code search we have here is one of the most incredible things I've e
by dvirsky 5y ago
Are there any open source powerful code search engines out there? As a Googler the internal code search we have here is one of the most incredible things I've ever seen, it's so fast and powerful I'm amazed by it daily. Is there anything near that quality out there?
- toomuchtodo 5y agoIf you don’t mind me asking, any insight into why it hasn’t been open sourced?
- dvirsky 5y agoThere is some older version that's open source, I haven't tried it and I don't know how much of today's code search is based on it. https://github.com/google/codesearch https://github.com/google/codesearch
- profquail 5y agoHoogle is pretty neat — you can search by type signature and it’ll find matching APIs from hackage packages: https://hoogle.haskell.org/ https://hoogle.haskell.org/ Source: https://github.com/ndmitchell/hoogle https://github.com/ndmitchell/hoogle
- beliu 5y agoWe built Sourcegraph taking inspiration from Google Code Search (https://about.sourcegraph.com/blog/ex-googler-guide-dev-tools https://about.sourcegraph.com/blog/ex-googler-guide-dev-tool...) to bring the power of code search—and precise code intelligence that just works—to every dev. Try it out here: https://sourcegraph.com https://sourcegraph.com. A super common thing we see is people leaving Google, missing code search, and then bringing Sourcegraph into their new org. We'd love to hear your feedback!
- beliu 5y agoSourcegraph is open-core, with a dual licensing approach. You can run the open-source version here: https://github.com/sourcegraph/sourcegraph#sourcegraph-oss https://github.com/sourcegraph/sourcegraph#sourcegraph-oss, and we have an enterprise offering for companies that want to adopt for their teams. Similar to GitLab, both our enterprise and OSS code is publicly available.
- Arnavion 5y agoThe best thing about the Sourcegraph instance hosted on sourcegraph.com is that you can edit the URL in your browser from https://github.com/foo/bar https://github.com/foo/bar to https://sourcegraph.com/github.com/foo/bar https://sourcegraph.com/github.com/foo/bar to be dropped down into a Sourcegraph search for that GH repo. I've been using it for a long time because of this convenience. (Though it would be even better if the two options for case-sensitivity and regex search were enabled by default instead of needing me to toggle them on every time.)
- billcaplan 5y agoYou should be able to do that over in your User Settings (Click your picture in the top right and then Settings.) Adding these two things should change that default for you: "search.defaultCaseSensitive": true, "search.defaultPatternType": "regexp", Also see: https://docs.sourcegraph.com/admin/config/settings#search-defaultCaseSensitive https://docs.sourcegraph.com/admin/config/settings#search-de...
- Arnavion 5y agoI don't have a user account (nor do I want to make one).
- axiosgunnar 5y agoAre you worried this new Github Code Search might steal all your users?
- dqv 5y agoNot a Googler, so I can't say. There was Mozilla DXR but it has been abandoned.
- jcranmer 5y agoDXR has largely been replaced with mozsearch (https://github.com/mozsearch/mozsearch https://github.com/mozsearch/mozsearch), and a quick glance through the really early history does show that it adopted a fair amount of stuff from DXR. The downside is that it's not as easy to set up a local mozsearch instance as old-school DXR was.
- jcranmer 5y agoI helped write DXR for indexing Mozilla's source code based on an instrumented compiler run; this has eventually been developed into mozsearch (https://github.com/mozsearch/mozsearch https://github.com/mozsearch/mozsearch), whose indexing for mozilla-central is visible here: https://searchfox.org https://searchfox.org.
- dqv 5y agoI thought it was abandoned! This is great to hear it just moved. Is there anyone at Mozilla that can update the old DXR repo [0] to direct people to MozSearch? [0]: https://github.com/mozilla/dxr https://github.com/mozilla/dxr
- jwin742 5y agoI work on a very large c++ monolith at work and DXR has been a real game changer for helping me just figure out how so much of the codebase works. Thanks!!
- Falell 5y agoMy job uses https://oracle.github.io/opengrok/ https://oracle.github.io/opengrok/ and I'm generally happy with it. It has some problems with special character searches at times but generally does what I want. It's certainly better than code search in our on-prem github instance.
- slaymaker1907 5y agoYeah, opengrok is great. It is very fast and usually returns good results.
- ibraheemdev 5y agohttps://grep.app/ https://grep.app/ is a great alternative to github's current search engine.
- throwamon 5y agoWould you by any chance be allowed to record a demo screencast?
- dti 5y agoYou can try it yourself, e.g., the instance the Android team uses: https://cs.android.com/ https://cs.android.com/
- dvirsky 5y agoOh, I didn't know this existed. The syntax seems to be on par with the internal one, I couldn't find any info on what's driving it.
- dti 5y agoAlso don't know how search works there, but the cross-reference functionality is powered by an open-source Kythe project: https://kythe.io/ https://kythe.io/
- loginatnine 5y agoWe're using https://searchcodeserver.com/ https://searchcodeserver.com/ internally and it works quite good, it was miles ahead GH search. After today, I'll have to test GH again to reassert this statement.
- treetide 5y agoFor the grepping aspect, https://github.com/google/zoekt https://github.com/google/zoekt is a powerful one-stop-shop. For the navigating, I don't know. SourceGraph maybe, but the linking is somewhat heuristic I assume, not compilation-graph powered. But maybe that changes or depends per language.