-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
pull extra::{serialize, ebml} into a separate libserialize crate #11984
Conversation
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable, | ||
DecoderHelpers, EncoderHelpers}; | ||
|
||
pub mod serialize; |
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.
Because of the reexport, I think this should be private (assuming that you're reexporting everything).
Should |
@sfackler not sure.. i was concentrating on all of the stuff that falls out of |
#[license = "MIT/ASL2"]; | ||
#[allow(missing_doc)]; | ||
#[forbid(non_camel_case_types)]; | ||
#[feature(globs, managed_boxes)]; |
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 the standard thing for the extra dissolution is to attempt to remove feature(globs)
; is that possible here?
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'll take a whack at it.. in the morning!
Nice work, thanks for doing this! I also feel as if hex/base64 should be candidates for this crate, and perhaps the crate should be called |
Why don't you separate serialize and ebml? I think we don't need to link to EBML or JSON library when we are developing another serialization library. |
@omasanori yours is a good point. However, it also depends on how granular we want to make this @alexcrichton |
@flaper87 well, probably we don't want to see hundreds of libraries in mozilla/rust. I hope the @rust-lang GitHub group will host non-fundamental official libraries (just like what @clojure does) but at this time we should think about the number of libraries in mozilla/rust... hmm... |
I don't particularly see a reason to separate ebml etc. from libserialize: in a statically linked release build (when the bloat is relevant and at risk of being the worst) the unused code will be removed from the binary. (Also, this needs a rebase.) |
As stated above, I think As for the library rename: meh, whatever. I think I can bring in |
I still need to remove globs, hopefully will knock that out before the SB. |
If you don't have the time, then it's perfectly fine to not move hex/base64 right now. I would think that the only thing blocking this from landing is |
I have no issues adding them in a later PR. plus would like to start a converastion about data structures like TreeMap, so that I could move json out, too. |
I would expect |
rebased to deal w/ libterm merge conflict + fix for stage1 libsyntax |
this should be ready to go.. r? @alexcrichton |
not sure what this is about.. failure on freebsd.
Those lines are immediately preceeded by the |
This is likely the |
- `extra::json` didn't make the cut, because of `extra::json` required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `serialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this extra: inline extra::serialize stub fix stuff clobbered in rebase + don't reexport serialize::serialize no more globs in libserialize syntax: fix import of libserialize traits librustc: fix bad imports in encoder/decoder add serialize dep to librustdoc fix failing run-pass tests w/ serialize dep adjust uuid dep more rebase de-clobbering for libserialize fixing tests, pushing libextra dep into cfg(test) fix doc code in extra::json adjust index.md links to serialize and uuid library
- `extra::json` didn't make the cut, because of `extra::json`'s required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `libserialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this - @pcwalton's change in 449a7a8 didn't sneak back in
…-pedantic, r=xFrednet Move `uninhabited_references` to `nursery` I think this lint has too many false positives and should be put in pedantic. See rust-lang#11984 and rust-lang#11985 for context. The lint is already in beta and is causing trouble for us, so I would also like this PR to be backported to beta as well. changelog: Moved [`uninhabited_references`] to `nursery` (Now allow-by-default) [rust-lang#11997](rust-lang/rust-clippy#11997) (Check if this has been backported) Fixes rust-lang#11984.
extra::json
didn't make the cut, because ofextra::json
's requireddep on
extra::TreeMap
. If/whenextra::TreeMap
moves out ofextra
,then
extra::json
could move intolibserialize
libextra
,libsyntax
andlibrustc
depend on the newly createdlibserialize
extra
types likeDList
,RingBuf
,TreeMap
and
TreeSet
forEncodable
/Decodable
were moved into the respectivemodules in
extra
src/libextra/lib.rs
where a stubof
extra::serialize
is set up (insrc/libextra/serialize.rs
) foruse in the stage0 build, where the snapshot rustc is still making
deriving for
Encodable
andDecodable
point at extra. Big props to@huonw for help working out the re-export solution for this