Skip to content

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

Merged
merged 3 commits into from
Oct 18, 2017
Merged

Update to Diesel master #1118

merged 3 commits into from
Oct 18, 2017

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented Oct 10, 2017

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)

crate_downloads::downloads.eq(amt),
crate_downloads::date.eq(download.date),
))
.on_conflict(crate_downloads::table.primary_key())
Copy link
Contributor Author

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!(
Copy link
Contributor Author

@sgrif sgrif Oct 10, 2017

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

Copy link
Member

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...?

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@carols10cents carols10cents left a 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),
Copy link
Member

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!(
Copy link
Member

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 {
Copy link
Contributor

@vignesh-sankaran vignesh-sankaran Oct 13, 2017

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)
@sgrif
Copy link
Contributor Author

sgrif commented Oct 16, 2017

I've rebased and killed the remaining raw inserts in update-downloads.rs. I'm going to leave the ones in category.rs for now, as they're a bit verbose and this PR is already really big

@carols10cents
Copy link
Member

Working ok for me! Let's do this!

bors: r+

@carols10cents
Copy link
Member

oops

@bors-voyager
Copy link
Contributor

bors-voyager bot commented Oct 18, 2017

Canceled

@carols10cents
Copy link
Member

bors: r+

bors-voyager bot added a commit that referenced this pull request Oct 18, 2017
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)
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Oct 18, 2017

Build failed

@carols10cents
Copy link
Member

i'm getting real tired of that intermittent faker error...

bors: r+

bors-voyager bot added a commit that referenced this pull request Oct 18, 2017
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)
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Oct 18, 2017

Build failed

@sgrif
Copy link
Contributor Author

sgrif commented Oct 18, 2017

bors: retry

Looks like it's some NPM issue

@sgrif
Copy link
Contributor Author

sgrif commented Oct 18, 2017

I guess retry doesn't work?

bors: r+

bors-voyager bot added a commit that referenced this pull request Oct 18, 2017
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)
@carols10cents
Copy link
Member

bors: r+

bors-voyager bot added a commit that referenced this pull request Oct 18, 2017
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)
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Oct 18, 2017

Build succeeded

@bors-voyager bors-voyager bot merged commit 57ae2d7 into rust-lang:master Oct 18, 2017
@sgrif
Copy link
Contributor Author

sgrif commented Oct 19, 2017

JavaScript is the worst.

@sgrif sgrif deleted the sg-bump-diesel branch October 19, 2017 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants