Hacker News new | ask | show | jobs
by sqs 4616 days ago
I'm helping build Sourcegraph, which lists the gems that depend on FFI here:

https://sourcegraph.com/github.com/ffi/ffi/network/repos/in

and can show where some of its main methods are used: https://sourcegraph.com/github.com/ffi/ffi/symbols/ruby/gem/...

and also for some other gems:

https://sourcegraph.com/github.com/nex3/sass/network/repos/i...

https://sourcegraph.com/github.com/lsegal/yard/network/repos...

https://sourcegraph.com/github.com/rails/rails/network/repos...

It would be great if someone added this functionality to rubygems.org (npmjs.org has it: https://npmjs.org/browse/depended/request).

The Ruby support is very alpha right now. It works for some (but not all) popular gems, and it doesn't show transitive dependencies yet. Also, the list of dependents isn't comprehensive, but it should be a good starting point. If there are any specific gems you'd like to see dependents for, or any issues you see, let me know.

3 comments

At a glance, there are perhaps 1400 gems that require or refer to ffi: https://www.google.ca/search?q=ffi+inurl:gemspec

But that's the type of site I was trying to find before I resorted to Google. I'd second that recommendation to add the functionality to rubygems.org ... Maybe we need a pull-request? :)

I will probably eventually submit a PR for this feature at https://github.com/rubygems/rubygems.org. If anyone else wants to get it started, I'd certainly help.
Had a play around on SG and it works really well; nice project. What JS framework, if any, are you using?
Thanks! We are using AngularJS with UI-Router and Backbone 3. The backend is in Go, with a native language component for each of the languages that we support (currently Python/Go/JavaScript/Ruby).
which lists the gems that depend on FFI

Are these only gems where the gem source code is in Github?

Pretty much (it also includes gems hosted on Bitbucket or Google Code).
Hmm. I was thinking it might be useful here: http://www.ruby-doc.org/gems/
Awesome site! It would be great if you added a link to Sourcegraph there. We're going to have language-specific homepages (sourcegraph.com/ruby) and I can let you know when that's ready if you would prefer to link to that.
What I was hoping was that for any given gem you could see, as part of the rendered docs, what other gems it relies on.

Basically, enhance the default docs that are generated by rdoc with additional information about the gem.

One-stop shopping, so to speak.

I'll let you know if/when I make that patch to rubygems.org (or if it's not possible, when sourcegraph.com could provide you with that info).