top | item 41467046

(no title)

azzentys | 1 year ago

Recently, I was browsing an open source project I use a lot. "Sign in to search code on GitHub" was kinda discouraging to see.

Sure, I can clone it and run grep/ripgrep - but sometimes I like the ability to search the code on the browser.

Is it only GitHub where this is a restriction or GitLab is similar?

discuss

order

aseipp|1 year ago

There are some alternatives like https://grep.app or https://sourcegraph.com/search if you want fast live search, but at the end of the day these are services offered by companies, and rather expensive ones especially for free anonymous users, so you should probably at least accept that service providers can and do change things like this.

You can also run something like your own copy of Zoekt and then ingest repositories on demand though it isn't quite as instant. But if it's code you're already using extensively, it seems like it might be worth it. Maybe you can write some boondoggle to automatically ingest repos based on dependency metadata, even.

amiga386|1 year ago

Github managed to provided search to free anonymous users since its inception in 2007, to mid-2023 when they introduced this new code search.

I would submit that this change is entirely business-related: it's a power-play to make people create accounts and stay logged in so they can track you better. It is not that they cannot afford it, it is that they are enshittifying the service to further their interests.

If they were really worried about money, they could lock it down completely so only paying customers could use the service at all... and then they'd lose a huge chunk of customers and lose all the prestige they build in convincing a huge pile of the world's free/open source software to use them as their hosting. So they don't do that - they keep all the prestige and the network effects by seeming _quite_ open, but they'll lock down _parts_ of the experience to try and force specific behaviour.

> you should probably at least accept that service providers can and do change things like this.

Indeed, you should. It should serve as a wake-up call that other people's services/platforms aren't under your control, and you can't rely on them to meet your needs.

eblume|1 year ago

It's worth mentioning here I think that github's code search is really quite good. I'm not trying to say that github can do no harm or that github "owning" OSS code hosting is a good thing, but the github search bar is a utility that IMO is worth the price of admission.

I think that sourcegraph maintains a similar quality OSS code search that can be searched for free but I have not personally used it.

AlotOfReading|1 year ago

The problem is that GH makes it the login process as painful as possible. Login tokens expire frequently, necessitating new logins. Logins require 2fa every time, which makes them extremely flow-breaking. Post-login you're not returned to the file you were on, so now you need to navigate back to search.

Logins are per domain and per device, so I end up dealing with this 4x per day if I'm using GitHub heavily. It's unnecessary.

zaik|1 year ago

If you find searching locally cumbersome, you should know that you can do a "shallow" git clone which only downloads the most recent commit and is much faster than cloning the whole repo.

    git clone --depth 1 ...

nicce|1 year ago

> Is it only GitHub where this is a restriction or GitLab is similar?

GitLab has had this long time.

corytheboyd|1 year ago

Do you have to be logged in to open a repo with the web version of vscode on GitHub? If not, that could make for a Good Enough search interface. Try pressing `.` on a repo page to see if it works

PhilipRoman|1 year ago

I believe it was added when they made their search more advanced and presumably more resource intensive.

amiga386|1 year ago

And yet, nothing stops them from continuing to offer their existing search to anonymous users. The search they have offered since inception.

They chose to take the existing search away from anonymous users to drive signups and logins. "Sign up and log in to get improved search" is not as compelling as "sign up and log in to get any search at all"