-
Notifications
You must be signed in to change notification settings - Fork 649
Update to Diesel master #1118
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
Update to Diesel master #1118
Conversation
crate_downloads::downloads.eq(amt), | ||
crate_downloads::date.eq(download.date), | ||
)) | ||
.on_conflict(crate_downloads::table.primary_key()) |
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.
Indentation is so much better now...
@@ -783,3 +783,26 @@ joinable!(version_authors -> users (user_id)); | |||
joinable!(version_authors -> versions (version_id)); | |||
joinable!(version_downloads -> versions (version_id)); | |||
joinable!(versions -> crates (crate_id)); | |||
|
|||
allow_tables_to_appear_in_same_query!( |
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.
Hopefully this is less confusing now, both with the new name and the fact that we just speculatively generate it for all tables
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.
If we generate it for all tables, why do we have to explicitly list this at all...?
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 don't understand the 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.
we just speculatively generate it for all tables
By "we", do you mean "crates.io" or "diesel"? If Diesel is doing this speculative generation, why does it have to be listed explicitly in src/schema.rs at all? Why isn't this built-in to diesel?
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.
This file was generated by diesel print-schema
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'm fine with the new APIs!! Very cool!!
There are a few more spots I see raw INSERTs in the tests of src/bin/update-downloads.rs and src/category.rs, can we not replace those yet or were they just not on your radar?
It looks like clippy is having problems now, I'll go take a look at that clippy updating PR next :)
new_badges.push(( | ||
badges::crate_id.eq(krate.id), | ||
badges::badge_type.eq(k), | ||
badges::attributes.eq(attributes_json), |
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.
Neat!
@@ -783,3 +783,26 @@ joinable!(version_authors -> users (user_id)); | |||
joinable!(version_authors -> versions (version_id)); | |||
joinable!(version_downloads -> versions (version_id)); | |||
joinable!(versions -> crates (crate_id)); | |||
|
|||
allow_tables_to_appear_in_same_query!( |
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.
If we generate it for all tables, why do we have to explicitly list this at all...?
@@ -280,20 +279,16 @@ impl<'a> NewCrate<'a> { | |||
} | |||
|
|||
impl Crate { |
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.
Could you add doc comments to the by_name
, with_name
, and all
functions in this impl?
Diesel's current master branch is likely to be reasonably representative of what 1.0 will look like from an API perspective. If there's any other parts of the code that we dislike and want to improve the API for, now is the time to speak up! The test changes are due to some deadlocks that I'm seeing now (which should have always been happening, I suspect some perf characteristic has changed somewhere)
I've rebased and killed the remaining raw inserts in |
Working ok for me! Let's do this! bors: r+ |
oops |
Canceled |
bors: r+ |
1118: Update to Diesel master r=carols10cents Diesel's current master branch is likely to be reasonably representative of what 1.0 will look like from an API perspective. If there's any other parts of the code that we dislike and want to improve the API for, now is the time to speak up! The test changes are due to some deadlocks that I'm seeing now (which should have always been happening, I suspect some perf characteristic has changed somewhere)
Build failed |
i'm getting real tired of that intermittent faker error... bors: r+ |
1118: Update to Diesel master r=carols10cents Diesel's current master branch is likely to be reasonably representative of what 1.0 will look like from an API perspective. If there's any other parts of the code that we dislike and want to improve the API for, now is the time to speak up! The test changes are due to some deadlocks that I'm seeing now (which should have always been happening, I suspect some perf characteristic has changed somewhere)
Build failed |
bors: retry Looks like it's some NPM issue |
I guess retry doesn't work? bors: r+ |
1118: Update to Diesel master r=sgrif Diesel's current master branch is likely to be reasonably representative of what 1.0 will look like from an API perspective. If there's any other parts of the code that we dislike and want to improve the API for, now is the time to speak up! The test changes are due to some deadlocks that I'm seeing now (which should have always been happening, I suspect some perf characteristic has changed somewhere)
bors: r+ |
1118: Update to Diesel master r=carols10cents Diesel's current master branch is likely to be reasonably representative of what 1.0 will look like from an API perspective. If there's any other parts of the code that we dislike and want to improve the API for, now is the time to speak up! The test changes are due to some deadlocks that I'm seeing now (which should have always been happening, I suspect some perf characteristic has changed somewhere)
Build succeeded |
JavaScript is the worst. |
Diesel's current master branch is likely to be reasonably representative
of what 1.0 will look like from an API perspective. If there's any other
parts of the code that we dislike and want to improve the API for, now
is the time to speak up!
The test changes are due to some deadlocks that I'm seeing now (which
should have always been happening, I suspect some perf characteristic
has changed somewhere)