-
Notifications
You must be signed in to change notification settings - Fork 643
Add support for reverse dependencies. #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
let stmt = try!(conn.prepare("SELECT dependencies.*, | ||
crates.name AS crate_name | ||
FROM dependencies | ||
LEFT JOIN versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these left joins instead of inner joins? (I have not looked deeply at the schema so this may be a stupid question.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mindless copypaste. I've adjusted it now.
Looks great, thanks @huonw! Can you also add some tests for the endpoint? You should see some examples in src/test/krate.rs |
import Ember from 'ember'; | ||
|
||
export default Ember.ObjectController.extend({ | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can delete this whole file because its blank.
This /api/v1/crates/foo/reverse_dependencies gives the full dependency information about each crate that depends on foo (i.e. crates with `[dependencies] foo = "..."`).
This connects the web-app to the back-end API and allows it to display a list of all the reverse dependencies of a crate as a /reverse_dependencies subroute. This uses the same format as the /versions route.
This includes making some changes to the test harness, e.g. allowing dependencies to be added from multiple versions of the dependent crate.
OMG awesome!!!! This is so cool :) ❤️ @huonw !!! |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
This adds an API endpoint
.../:crate/reverse_dependencies
and a web-page/crate/:crate/reverse_dependencies
for displaying. It's modelled after the.../versions
page, and is not currently linked from anywhere.Fixes #68.