10 ms·
Sourcegraph Server 2.4: free, powerful search for private code
- garjana 9y agoBeen waiting for more from you guys. Great work!
- sqs 9y agoSourcegraph CEO here. Thanks for this post. We packed a lot of stuff into 2.4: faster, more powerful code search, Google Alerts-style search monitoring, diff searches, and more. It’s now free on a single server for any number of users and repositories. Happy to answer questions here.
- egeozcan 9y agoDo you support mercurial? If not, is it planned?
- sqs 9y agoSourcegraph only supports Git natively, not Mercurial. You could use Sourcegraph with Git mirrors of your Mercurial repository, if that is appealing, and we'd definitely consider adding in some extra translation work so that the Mercurial metadata embedded in the Git mirror repository would be respected. Does your code host (or do you internally) already have a Git mirror of your repository?
- mintplant 9y agoI wonder if the work done for git-cinnabar, which maps a Mercurial repository to something git understands, could help at all here? https://github.com/glandium/git-cinnabar https://github.com/glandium/git-cinnabar
- pathartl 9y agoWhat's the analytics/telemetry feature? I don't see it discussed on the site at all.
- sqs 9y agoAnalytics lets you see statistics about how your own server's are using it (each user's total count of pageviews and searches). Telemetry lets you see the telemetry data it sends to Sourcegraph (which you can disable in the site config and never contains code/paths/repo names or anything derived from them).
- oxplot 9y ago> Google Alerts-style search monitoring I expected email notifications but all I managed to do was to add the saved queries on the home page. Am I missing something?
- sqs 9y agoEmail and other kinds of notifications for saved queries are coming in the next release in early Feb. Email me (sqs@sourcegraph.com) if you'd like to preview them sooner. I agree they are crucial for this feature to feel truly complete and awesome. The homepage does show a nice sparkline and results summary, though. Easy to see at a glance if new secret keys, deps, etc., are added to your repositories if you set up the queries.
- pvg 9y agoCan this be run without docker, somehow? It's nigh-unusable on OS X with it.
- sqs 9y agoIt requires Docker for now. A lot of people use it on macOS successfully. What are you seeing?
- pvg 9y agoInstalled it, configured it, pointed it at the public cpython repo, it said 'cloning' and then pegged cpu for about 15 minutes (with about a third to a half of the usage in 'system') and eventually kernel-panicked.
- sqs 9y agoSorry about that. What version of macOS and Docker for Mac? We’ll look into that now.
- pvg 9y agoOS 10.13.3 (17D34a) and Docker 17.12.0-ce-mac46 (21698). I don't think it's you, Docker is just still a bit flaky there, which is why I'm asking. I'll try it with something smaller.
- swsieber 9y agoI've heard that docker does have a (inconsistent) CPU usage issue on OS X. I would definitely pin it on docker.
- sqs 9y agoThanks. Theoretically it'd be possible for us to ship a static Go binary for everything except for our syntax highlighter and the (very convenient) bundled PostgreSQL and Redis. We'll monitor the feedback we get and see how to prioritize this. It definitely helps to hear that Docker did not work well for you.
- senatorobama 9y agoDo you accept REMOTE jobs?
- deleted 9y ago[deleted]
- sqs 9y agoYes, we have some fantastic international and non-SF-based teammates at Sourcegraph, and we'd love to have more.
- senatorobama 9y agonon US?
- virgilp 9y agoYes. I was wrong in my previous answer - after sqs's response, I looked them up on linkedin, they have at least a german developer in Berlin. (FWIW - and I'm only saying this in case you were in a similar situation: I applied to them for a job not because I was looking for one, but because I accidentally saw it on HN and the match between my skills and their apparent need was simply "too good to be true" territory. I wasn't necessarily expecting an offer, but I expected to talk to someone - was curious to learn more about what they're doing. However, I got rejected straight away - so I just assumed that they said "REMOTE" for the heck of it... I know it sounds arrogant, but I have a hell of a hard time believing their other applications outclass me so obviously that it was not even worth talking to me, so I assumed it must be something else)
- jitl 9y agoDo you have any publicly available security review documents?
- sqs 9y agoOur security page is at https://about.sourcegraph.com/security https://about.sourcegraph.com/security. We have a security assessment that we can share with customers, but not one that we post publicly yet. We have customers who run Sourcegraph on machines that are completely blocked off from the Internet and only have access to the specific IP ranges of their code hosts on the same network. You can set it up like that if you'd like, which would significantly reduce the risks without needing to trust any third parties (us or the security reviewer).
- rswail 9y agoDo you have a non-docker installation? The equivalent of gitlab's omnibus would be awesome. Particularly for things like postgres configuration etc.
- sqs 9y agoWe'll definitely consider it. What benefits would you get from having non-Docker? (Not saying there aren't any, just curious what your biggest needs are.) Re: PostgreSQL configuration, is it that you want to be able to manage and back up the data yourself (not using the Docker container's internal PostgreSQL), or is it a tuning/performance concern, or something else? BTW, someone else down-thread asked for this, too (https://news.ycombinator.com/item?id=16121182 https://news.ycombinator.com/item?id=16121182).
- akavel 9y agoWhat benefits does it have over git grep, esp. if I'm using a monorepo? What new patterns/possibilities does it enable? Is it maybe speed somehow? (I assume it could then be more "live search/exploration"/rapid exploration than git grep - but OTOH wouldn't it require some slow reindexing after each change?)
- sqs 9y agoFor code search on a monorepo, Sourcegraph is often faster in UX and execution time for a lot of tasks. It's easier/faster to filter the results than `git grep`, you can see more on your screen, it's easier to jump to the full file, it's easier to see blame info for particular lines, etc. Sometimes while coding you just need to find where something is so you can edit it or jump to it. In that case, your editor's search or `git grep` is definitely better. But when you're looking for example code, reviewing/reading code, or debugging code, it's often better to do it in a UI that's more optimized for those tasks than `git grep` and your editor. And then Sourcegraph also has code intelligence, code host browser extension integrations, saved queries, etc., beyond the basic code search. Google has a massive monorepo, and they have a similarly advanced code search system that they describe publicly. It's very well loved and frequently used by their developers. If you know any ex-Googlers (or ex-Facebookers, who have a similar system), ask them, and check out https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43835.pdf https://static.googleusercontent.com/media/research.google.c... and https://docs.google.com/document/d/1LQxLk4E3lrb3fIsVKlANu_pUjnILteoWMMNiJQmqNVU/edit#heading=h.xxziwxixfqq3 https://docs.google.com/document/d/1LQxLk4E3lrb3fIsVKlANu_pU.... BTW, Sourcegraph doesn't use an index for search. We heavily optimized the performance of searching an arbitrary revision that has never been indexed. So no slow reindexing after each change.
- deleted 9y ago[deleted]
- demarq 9y agoFor those of us associated with very many repos is there a way to limit cloning to only the ones we work with?
- dvirsky 9y agowhat's the underlying search engine?
- ohstopitu 9y agounrelated question to the server but related to Sourcegraph: Why did you guys switch away from the VS code style editor on the web to an uneditable one? I loved using it. on an unrelated note: did you work on AWS SQS?
- sslalready 9y agoJust tried this out on some of our code bases. It appears to fail to generate snippets/highlights for all files that contain non-Unicode text, e.g. "Müller" in ISO-8859-1. Known issue? Many queries times out for me although I'm running it on a pretty beefy AWS c5 instance with SSDs. Queries such as "type:diff" doesn't seem to work at all on my code bases. It also does not appear to cache any data from previous runs of "git log", so attempting to do the suggested reload doesn't really workaroudn the issue. Are you working on improving the performance?
- beliu 9y agoSorry to hear that it didn't work out of the box for your repositories. I've filed the non-Unicode text issue here: https://github.com/sourcegraph/issues/issues/32 https://github.com/sourcegraph/issues/issues/32 We're actively working on improving the performance of diff search, but I would expect other types of queries to complete quickly. Would you mind sharing more about the size / characteristics of your repositories? Feel free to email me at beyang@sourcegraph.com if a private channel is better.
- sslalready 9y agoThanks, I'll keep an eye on this. Three examples: 300MB size, 600 branches, 25k commits. 250MB, 250 branches, 15k commits. 80MB, 100 branches, 4k commits. Textwise it is a mix of Golang, JS and Python. Most of the repo size comes from binary resources (images etc).
- the_common_man 9y agoVery cool, will give it a try later for our gitlab repos. Is gitlab supported? Also, I cannot find the code for sourcegraph on github. It used to be available under a fair source license. Anyone have a link to the code?
- sqs 9y agoYes, Sourcegraph supports GitLab repositories! Check out https://about.sourcegraph.com/docs/server/config/repositories#sync-repositories-from-any-code-host https://about.sourcegraph.com/docs/server/config/repositorie... and the section right below for auth. You'll need to add and authenticate them one-by-one in the config. Soon we'll be add direct GitLab integration like we have for GitHub and GitHub Enterprise, which will sync all (or selected) repositories using the GitLab API. The source code is not public for this version. I think that source-available but non-open-source licenses are an idea ahead of their time when applied to user-facing software like Sourcegraph. I hope that changes, and we'd love to make Sourcegraph source-available again, but it actually introduced (rather than eliminated) questions in the process of companies adopting Sourcegraph. I'll probably blog about this soon because it's something I care about a lot.
- the_common_man 9y ago> I'll probably blog about this soon because it's something I care about a lot. Yes, please! I have seen your videos and read a lot about your thoughts on this subject. Another question, if you don't mind: does sourcegraph have a forum or irc/slack? A quick search for sourcegraph+slack ends up finding many hits.. for your name, lol.
- sqs 9y agoCool! We don't have a public Slack/IRC yet, but it seems like something we might do in the future. In the meantime, we're all pretty responsive on Twitter and on email. And yeah, my last name being Slack does create some confusing moments sometimes. :)
- sytse 9y ago
- orsenthil 9y agoWhy should we use this instead of the github search (for our private repos) ?
- deleted 9y ago[deleted]
- drb91 9y agoI mean honestly if you are happy with github search you should stay where you are. Personally, I find it to be absolutely horrendous. It’s so much faster to clone the repo and search it locally.
- zeusk 9y ago> Personally, I find it to be absolutely horrendous. Why is that so?
- drb91 9y agoThese are the reasons of which I am conscious: 1. There doesn't appear to be any relevancy sorting. It appears only the exact term is returned. If it’s not exact, I am not sure how to control whether or not it looks for an exact match and/or what strategy it uses to fuzzy match. Does it tokenize? Use some kind of levenstein distance algorithm? 2. The query results are hugely wasteful in terms of screen space. This means searching for a minorly common term in a large codebase is prohibitively time consuming compared to cloning + ripgrep or whatever. 3. There's no way to search file names + file content. It took me 7 years after github's creation to realize you could search for filenames if you press 't' on the repository. 4. No regex or globbing support, to my knowledge. This is before listing all the tooling (like sourcegraph) I would hope would be built into a source code repository to assist browsing but are strangely missing--every IDE and editor out there is much faster at casually browsing code because navigation is so much cheaper and frictionless. I mean overall it's not broken, it's just way less useful for searching a tree of code files than find/xargs/grep is, let alone ack/thesilversearcher/ripgrep. If the capabilities I'm describing are there, they're well-hidden. Github just isn't a good place to browse code.
- hetoh 9y agoWhat is the License for the free install ? MIT/BSD/Apache ?
- teraflop 9y agoHere are the terms: https://about.sourcegraph.com/terms/ https://about.sourcegraph.com/terms/ I note with some distaste that it includes an Oracle-esque prohibition on benchmarking. > You may not release the results of any performance or functional evaluation of any of the Software to any third party without prior written approval of Sourcegraph for each such release.
- sqs 9y agoSourcegraph CEO here. That shouldn’t be in there, I agree—we meant to remove that section. It will be removed in a couple of minutes. Please try it, use it, and post lots of evaluations about our product. :)
- benatkin 9y agoNo, it isn't open source. It's similar to GitHub Enterprise.
- exikyut 9y agoI couldn't help but notice some interesting items get cloned in the onboarding GIF (which was 16MB, yikes) - https://github.com/sourcegraph/sourcegraph-classic https://github.com/sourcegraph/sourcegraph-classic - https://github.com/sourcegraph/sourcegraph-archive-private-20160601 https://github.com/sourcegraph/sourcegraph-archive-private-2... - https://github.com/sourcegraph/infrastructure https://github.com/sourcegraph/infrastructure - https://github.com/sourcegraph/sourcegraph https://github.com/sourcegraph/sourcegraph - https://github.com/sourcegraph/definfo-prototype https://github.com/sourcegraph/definfo-prototype - https://github.com/sourcegraph/sourcegraph-desktop https://github.com/sourcegraph/sourcegraph-desktop - https://github.com/sourcegraph/sourcegraph-emacs-beta https://github.com/sourcegraph/sourcegraph-emacs-beta - https://github.com/sourcegraph/splunk-promethus-alerts https://github.com/sourcegraph/splunk-promethus-alerts - https://github.com/sourcegraph/ZARCHIVED-corporate https://github.com/sourcegraph/ZARCHIVED-corporate - https://github.com/sourcegraph/css-langserver https://github.com/sourcegraph/css-langserver Listed as they showed up in the GIF. That was fun!
- ausjke 9y agodoes it support gitea? gitea has become my sole self-hosted git repository portal, lightweight comparing to gitlab and get the job done super well.
- wut42 9y agoit does: https://about.sourcegraph.com/docs/server/config/repositories#sync-repositories-from-any-code-host https://about.sourcegraph.com/docs/server/config/repositorie... :)
- tomalpha 9y agoDo you have any plans to add more languages to code intelligence? (Particularly C and C++)
- alkonaut 9y agoWhich version control systems are supported?
- mikevm 9y agoHow does this differ from OpenGrok https://oracle.github.io/opengrok/ https://oracle.github.io/opengrok/ ?
- dman 9y agoOpengrok supports C/C++.
- attfarhan 9y agoCode search on Sourcegraph Server is actually language agnostic. Here's an example of a C++ search query: https://sourcegraph.com/search?q=repo:google/leveldb+FilterBlockBuilder https://sourcegraph.com/search?q=repo:google/leveldb+FilterB...
- dman 9y agoOpengrok implements hyperlinking for C/C++ code which is the primary productivity multiplier since it allows you to easily jump around callgraphs. That functionality is sorely missing here (unless i am missing this feature somehow).
- attfarhan 9y agoYou can see a feature comparison table here: https://about.sourcegraph.com/products/code-search/ https://about.sourcegraph.com/products/code-search/ Let us know if you have any other questions or feedback!
- sslalready 9y agoWow, that's a pretty awful UI. The default search form screams "advanced search" from the late 90ies. The compare example looks pretty dated too. I think Kibana and Sourcegraph are on the right track with a single input field that accepts field:value type searches. They're great once you've learned them.
- hanwenn 9y agoFor people interested in searching code using an open source solution, you might be interested in Zoekt too, github.com/google/zoekt. There is a demo site where you can search 30G of source code (including the Linux kernel, Android and Chrome) supporting regular expressions, and file name search: https://cs.bazel.build/?q=%20 https://cs.bazel.build/?q=%20 For example, https://cs.bazel.build/search?q=+r%3Atorvalds+craz%5Byi%5D&num=50 https://cs.bazel.build/search?q=+r%3Atorvalds+craz%5Byi%5D&n... looks for craz[iy] across the Linux kernel.
- sytse 9y agoZoekt looks very interesting. We'll consider adding it to GitLab in https://gitlab.com/gitlab-org/gitlab-ce/issues/41925 https://gitlab.com/gitlab-org/gitlab-ce/issues/41925 and https://gitlab.com/gitlab-org/gitlab-ce/issues/41450 https://gitlab.com/gitlab-org/gitlab-ce/issues/41450 Please comment in those issues if you have thoughts about if we can use it. BTW I know you're in Munich now but I wanted to say hi from your hometown Utrecht.
- sytse 9y agoThanks for commenting in https://gitlab.com/gitlab-org/gitlab-ce/issues/41450#note_54181315 https://gitlab.com/gitlab-org/gitlab-ce/issues/41450#note_54...