The indexing they talk about in that article seems like rearranging the deck chairs on the Titanic so far as that is concerned.
The indexing they talk about in that article seems like rearranging the deck chairs on the Titanic so far as that is concerned.
/func.+MyFunc/
vs a search for where it is used: /\.MyFunc/
I agree that it would be nice to have more language aware IDE-style features but I’m just happy to have regex support which is almost always powerful enough to express what I am looking for.It’s possible GitHub could also leverage those language servers (which would be super cool) but doing it at GitHub scale is certainly not trivial.
Poor man’s version using the new GitHub search would be to construct a regex that matches one but not the other.
To be specific, I was looking for the definition of one method in Highcharts so I could understand what it does and override it, GitHub gave 6 pages of results. I was able to find the function immediately in my IDE once I checked out the 100mb+ repository and it indexed it. If I’d been able to the same w/ the search on GitHub it would have saved me considerable time and hassle.
This search could be implemented by something that compiles and indexes like the IDE (sourcegraph) or maybe some kind of shallower parsing. Highcharts is in typescript which I’d don’t know well but in JavaScript the later might be a little tricky because there are so many ways to define a function (one hell of a regency.). I’d contrast to Java where is would be very easy to write a rule that would turn up a class definition if not a method definition, in my case finding the class would have solved my problem.
https://github.com/highcharts/highcharts
for Series.drawPoint and expecting a direct hit for
https://github.com/highcharts/highcharts/blob/29d2a83a5a997b...
practically I tried "Series" and "drawPoint" also.