Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Re-export bson lib #290

Merged
merged 5 commits into from
Nov 14, 2018
Merged

Re-export bson lib #290

merged 5 commits into from
Nov 14, 2018

Conversation

kyeah
Copy link
Contributor

@kyeah kyeah commented Nov 12, 2018

Closes #281.

This converts usage of macro_use into explicit imports of use bson::{bson, doc}.

Also re-exports bson::* to remove downstream requirements of installing the correct version of bson.

Cut as version 0.3.11.

cc. @H2CO3

@kyeah kyeah requested a review from saghm November 12, 2018 22:41
@H2CO3
Copy link

H2CO3 commented Nov 13, 2018

Awesome! 👏

Copy link
Contributor

@thedodd thedodd left a comment

Choose a reason for hiding this comment

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

You rock, @kyeah! I'll pull this branch in one of my repos just to make sure that it works as expected with the macros &c.

Thanks for knocking this out, man!

Copy link
Contributor

@thedodd thedodd left a comment

Choose a reason for hiding this comment

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

Well, I'm happy to report that I was able to pull this branch locally, test it against the wither crate, and all tests, including compiler tests (for the custom derive) passed. All testing was on stable Rust 2015.

Pretty much all that needed to happen was updating extern crate statements and putting the #[macro_use] on top of the extern crate mongodb;, as expected.

Great work!

Co-Authored-By: kyeah <[email protected]>
@Kampfkarren
Copy link

This is vital to me, any ETA on merge?

Copy link
Contributor

@saghm saghm left a comment

Choose a reason for hiding this comment

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

Apologies, I completely missed this PR until now. I think after Rust 2018 comes out (which will be in 1.31, the next stable version), we should look into using the local_inner_macros attribute to allow users to just import doc! (and not need to import bson! as well). It's described in more detail here; specifically, it'll make it usable both for users on 2015 edition and 2018 edition.

That being said, I see no reason to block this on that release, as it still works for everybody on the currently released version. Thanks for doing this @kyeah!

@kyeah kyeah merged commit 421e151 into mongodb-labs:master Nov 14, 2018
@kyeah
Copy link
Contributor Author

kyeah commented Nov 14, 2018

Merged; I'll make a release tonight if @saghm doesn't get to it before me.

@kyeah kyeah deleted the kev-pub-bson branch November 15, 2018 01:34
@H2CO3
Copy link

H2CO3 commented Nov 15, 2018

Awesome, you guys are the best! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants