Hacker News new | past | comments | ask | show | jobs | submit login

Sourcegraph CEO here. We're back to work on testing release candidates for Sourcegraph 2.12, coming out this week. I'm especially excited about a few big new features that fit really nicely into the code search and browsing workflows people use Sourcegraph for:

- https://github.com/sourcegraph/about/blob/master/projects/ex...

- https://github.com/sourcegraph/about/blob/master/projects/so...

- https://about.sourcegraph.com/blog/discuss-code-and-docs-in-...

along with a whole host of improvements to code search, code intelligence, self-hosted deployment on a single node and k8s, etc.

Happy to answer any questions folks have about our open sourcing. I summarized the business case at https://twitter.com/sqs/status/1046913901688807424. And we went with the Apache License (2.0) and an open core model because that's about as standard and as open as possible for this kind of thing.

Thanks for creating Sourcegraph for GitLab https://github.com/sourcegraph/about/blob/master/projects/so... we really appreciate it.

Every single developer that used Sourcegraph and talked to me about it loved the product. I think that every code product must have intelligent navigation.

I saw you already responded to my tweet in https://twitter.com/sqs/status/1046986755919024129 We're looking forward to add Sourcegraph to GitLab by default and it is awesome that you offer to do the work.

Thanks for choosing the Apache license which will make this much more acceptable to some companies then for example AGPL.

Sourcegraph CEO here. :) Thanks for creating GitLab and for the kind words. We're indeed looking forward to adding Sourcegraph to GitLab by default. Look out for a prototype/proposal MR from us in a bit. That's one of the super valuable kinds of features/integrations that we can do now that Sourcegraph is open source!

Amazing! Here's an issue we can use to discuss: https://gitlab.com/gitlab-org/gitlab-ce/issues/41925

Awesome! Apart from the Web IDE having Sourcegraph code navigation by default in the repository view would be great.

It's too bad that a browser extension is required to make this work. I've asked previously for GitLab to provide the necessary hooks so that any plugin could offer this type of functionality in a first class way, and was told that the proposal lacked a "concrete first need". I suppose SourceGraph has now demonstrated the usefulness of such a thing, which is great!

Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/33047

Yes, we would love to integrate Sourcegraph into all code hosts directly and not require users to install a browser extension. Please provide the same feedback to other code hosts you use (GitHub, Bitbucket, Phabricator, etc.) as well and link to this thread. :)

How is the process for that? I'd like to get that integrated into RhodeCode as well.

Hey! Sourcegrapher who works on the browser extension and other integrations here.

The road to complete integration in a product is a bit longer as it takes collaboration if the product isn't open source. This is what we'd like in every product we integrate with.

However, I just did quite a bit of refactoring to make it easier and more straight forward to add support for new code hosts to the browser extension.

If you want to add support, we'd gladly accept a PR!

Always feel free to reach out and ask questions. Check out how it's done on GitHub, GitLab and Phabricator here: https://sourcegraph.com/search?q=repo:graph%5C/browser-exten...

Thanks for your answer. Our product is actually also open-core. And the source is here: https://code.rhodecode.com/rhodecode-enterprise-ce

In this case, what's the best process to start, should we open an issue, or send support email?


In that case, let's build it right in to RhodeCode!

A good place to start would be opening an issue on your product's issue tracker and start discussing requirements there.

Thanks, we'll discuss this and follow up!

This is exciting!

Hello Mike! Can you please reference the Sourcegraph example in the issue? Maybe this will initiate further discussion and convince someone to reconsider your proposal. Thank you!

Yes, for sure there is a need now. We can do either a plug-in or just integrate Sourcegraph directly into GitLab.

It would be great to do it via a generic plugin interface, if possible.

Sourcegraph engineer here - that's the goal of the Sourcegraph extension API, being generic and code-host agnostic. One Sourcegraph extension can provide the same features on any code host (Gitlab, GitHub, Bitbucket, ...)

Hey, I worked on the GitLab support. I'm glad developers are liking it so far!

Thanks for building a great product with clean APIs and user interfaces that are easy to integrate with!

Hey, couple questions for you:

- We are a pretty small shop, only 3 developers, and looking at Sourcegraph for the first time. We have a full Kubernetes cluster for running some of our production applications and would be happy to run this there. The Sourcegraph site lists a Quickstart instructions and instructions for Data Center. I am unsure what exactly the difference between them is.

- The Docker image for sourcegraph/server (used in your Quickstart instructions) doesn't have a Dockerfile listed anywhere. Is that available somewhere?

- The Quickstart instructions also seem to instruct mounting the Docker socket into the container. I haven't seen anything that explains why that is required.

Basically wondering which version I should be looking to deploy for our small team.

You should definitely use our Quickstart instructions :) You can deploy it to your existing Kubernetes cluster (or any other Docker environment).

- The Quickstart instructions[1] describe how to set up a single-machine single-container Sourcegraph instance, which is recommended for small teams. Our Data Center[2] offering is for large teams and runs Sourcegraph across multiple machines in multiple containers for high availability, scalability, etc.

- The Docker Hub image sourcegraph/server is the official, free Sourcegraph build is called Sourcegraph Core and it includes various paid enterprise features built in so that upgrading to Sourcegraph Enterprise is easy (you only need to supply a license key, rather than migrating to a new Docker image). So, the exact recipe for building it is not open-source. However, we use the same exact Dockerfile in Sourcegraph OSS[4] which you can take a look at.

- Each language server providing code intelligence will run as separate Docker container. By mounting the Docker socket into the container, Sourcegraph can automatically start/stop/manage these containers for you. However, this is not required, and in the case of Kubernetes deployment we do not recommend it, please see the "Manual Installation" section of our Code Intelligence docs[5] for more information.

[1] https://about.sourcegraph.com/docs

[2] https://github.com/sourcegraph/deploy-sourcegraph

[3] https://about.sourcegraph.com/pricing/

[4] https://github.com/sourcegraph/sourcegraph/blob/master/cmd/s...

[5] https://about.sourcegraph.com/docs/code-intelligence/install

Hey, quick question (and maybe this is just a legacy from before open source):

From[1]: "If you do not wish to pay for code intelligence, you can disable language servers in the Code intelligence section of the site admin area."

The pricing page however says that feature is included in the free version. It just doesn't seem to make sense to me.

[1] https://about.sourcegraph.com/docs/code-intelligence/install

Sourcegrapher here. Yep, this was a reference to an old pricing model. Just pushed a fix, it will be live soon!

Thanks for the response and quick fix. :)

That last link is exactly what I needed! Thank you very much for all the information and help. :)

Congrats Quinn and company! I hope there's not too much of my code lurking in there =)

Oh! Hey Nico :) Hope all is going well! I miss having ya around!

Is it easy to add new languages? I work at a large company with some very old codebases.

@chrismwendt is a Sourcegrapher working on this. Posting this on his behalf:

Here is how I added GraphQL support last week:

- Follow the hello world tutorial https://github.com/sourcegraph/sourcegraph-extension-docs/bl...

- Add logic to handle hovers and definitions https://github.com/sourcegraph/sourcegraph-graphql

- Write the server part https://github.com/chrismwendt/graphql-ws-langserver (once a browser-based GraphQL analysis library exists, this would be unnecessary because the analysis could be done entirely in the browser)

It's available at https://sourcegraph.com/extensions/chris/graphql and once you enable it you can test it out on a GraphQL file such as https://sourcegraph.com/github.com/chrismwendt/graphql-ws-la... (it's pretty slow/janky at the moment and could be improved, but works).

If you're interested in interfacing with other tools too, you might be interested in LSP (Language Server Protocol):

- https://langserver.org/

- https://microsoft.github.io/language-server-protocol/specifi...

Cool! Are you working on IDE plygins, e.g. for Atom?

Yes, we have basic editor/IDE plugins that let you (1) open up Sourcegraph to the current document's file/line and (2) search. Sourcegraph for Atom is in prelrease at https://github.com/sourcegraph/sourcegraph-atom. Other editors are at https://about.sourcegraph.com/docs/integrations/.

What features (other features, if any) are you specifically interested in? It would be awesome if you posted feature request issues on the open-source repos for sourcegraph/sourcegraph or for the editor plugins!

No vim/nvim or emacs editor plugins?

The two most popular editors used by programmers...


Sourcegraph CEO here. I use Emacs personally and configured https://github.com/sshaw/git-link to make it work for me. See https://github.com/sshaw/git-link#building-links-and-adding-.... Will submit a PR or make our own sourcegraph-mode at some point (if anyone else wants to do so, that would be awesome).

Citation needed...

Just wanted to say thanks for making code intelligence part of the core product, Sourcegraph has been wonderful!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact