Sourcegraph has removed the formerly open source core repository for its popular code search product from public view – with CEO and co-founder Quinn Slack saying open source makes little sense for “full server-side end-user applications” and adds “extra work and risk”.
Eric Fritz, a former Sourcegraph engineer, posted about the implications of the change, complaining about broken links (impacting his work for the Sourcegraph engineering blog) as well as what he sees as the end of a culture of building “100% in the open”.
Slack engaged in a discussion on Hacker News, saying: “we made our main internal codebase (for our code search product) private. We did this to focus. It added a lot of extra work and risk to have stuff be open source and public.” He added that open source “could make sense for a lot of companies” but only for “infrastructure products or client tools,” not server code for end-user applications.
That is a change of heart since 2018 when Slack posted that Sourcegraph was now open source under the Apache license, though additional enterprise features remained closed source. “We opened up Sourcegraph to bring code search and intelligence to more developers and developer ecosystems,” Slack said. Further goals were to “make basic code intelligence ubiquitous” for every language and IDE, and to increase the amount and quality of open source code.
The closing of Sourcegraph code began in June 2023 when the company relicensed much of the code to an enterprise license instead of Apache, but stated that “the source code will remain publicly available.”
Slack now says that the code will no longer be public, though there is a public snapshot of the repository just before it became private. Slack gave reasons for the change including keeping “very differentiated” code secret, hiding code intended to prevent abuse, and that removing the open source license enabled new revenue streams with cloud providers and other resellers.
He also reckons the company got little benefit from external contributions to the code, claiming that “end-user server-side applications just don’t get nearly as many contributions” as other types of project. The implication is that for Sourcegraph, open source introduced extra work and risk but without the mitigation of getting improved code via unpaid contributors.
Amazon Web Services had a public dispute with Elastic over its use of the formerly open source Elasticsearch product. In 2021, AWS introduced OpenSearch, based on Elasticsearch 7.10, and stated that the project had “a rich roadmap of new and innovative functionality.” Perhaps Slack had this in mind, since he said that even if 60 percent of Sourcegraph Code Search was open source, and 40 percent closed, then “distribution partners have outsized incentives and capacity to reimplement the subset of the 40 percent that they think their market needs.”
Public code is used for training AI models that then propose code to developers via coding assistants – including Sourcegraph’s Cody, which remains open source under the Apache 2.0 license. Removing code from public view is therefore not good for coding assistants. Nor is it good for public code search services, one of which is operated by Sourcegraph.
A developer complained that this public index has been “silently destroyed … it seems that all GitLab repos are gone from the index and a huge number of GitHub repos as well.”
Slack replied that the index still includes almost a million repositories but that many had been removed because “it was very complex to keep up with millions of repositories due to GitHub rate limits and scaling.” In particular, repositories with few GitHub stars have been removed.
While these changes are largely negative for developers, there is some sympathy for the difficulties faced by Sourcegraph. “Like Cockroach’s recent relicensing, I think we should be thankful for the good years and awesome stuff the last boom era brought, and not be too harsh on the principled founders who now find themselves having to make hard decisions,” said one. CockroachDB recently retired its free open source core product in favour of an enterprise offering.