Skip to content

Rename krate in json to crate #861

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 1 commit into from
Jul 8, 2017

Conversation

carols10cents
Copy link
Member

@carols10cents carols10cents commented Jul 8, 2017

This was changed when switching from rustc serialize to serde; ember
expects the key in the JSON to be "crate" but Rust needs the field in
the struct to be named "krate". The tests didn't catch this because we
aren't testing the serialized JSON string at all; a round trip through
JSON totally worked :-/

This breaks the reverse dependencies page-- the name of the dependent crate doesn't show up.

I checked everywhere that has krate:; it looks like all the other places have serde renaming appropriately.

Found this while testing on staging before deploying to prod-- @sgrif you around to review?

This was changed when switching from rustc serialize to serde; ember
expects the key in the JSON to be "crate" but Rust needs the field in
the struct to be named "krate". The tests didn't catch this because we
aren't testing the serialized JSON string at all; a round trip through
JSON totally worked :-/
@sgrif
Copy link
Contributor

sgrif commented Jul 8, 2017

Seems good. Is there any more comprehensive checking that we can do here? I suspect this isn't the only one as I raised in #801 (comment)

Copy link
Contributor

@sgrif sgrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way this fixes the immediate problem

@ordian
Copy link
Contributor

ordian commented Jul 8, 2017

Oh sorry, I somehow missed that one.

@carols10cents
Copy link
Member Author

Yeah idk since we don't really have end-to-end integration tests or like... golden master tests of the JSON responses :-/

@carols10cents carols10cents merged commit 70b5481 into rust-lang:master Jul 8, 2017
@carols10cents carols10cents deleted the serialize-fix branch July 8, 2017 17:34
@sgrif
Copy link
Contributor

sgrif commented Jul 8, 2017

We had talked a while ago about maybe adding an integration suite that hits the frontend hitting a real backend maybe written in Ruby or something. It might be a good time to move forward with that.

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.

3 participants