-
Notifications
You must be signed in to change notification settings - Fork 83
Migrate from rustc-serialize to serde 1.0 #215
Conversation
Tests on Travis are failing on rust 1.12. |
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 is awesome, thanks! This all looks pretty good. There are a couple nits that need to be resolved before bringing this in though.
Could you also please rebase and squash this PR down to a single commit when you're ready? Thanks!
@@ -1,6 +1,5 @@ | |||
language: rust | |||
rust: | |||
- 1.12.0 |
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 understand why we can no longer use Rust 1.12 (serde_derive
requires Rust 1.15 IIRC), but there's a reason why a specific version is tested in Travis: to ensure we don't accidentally bump the minimum Rust version required to build docopt. For this reason, please put the minimum version back. I think Rust 1.15 would be suitable.
Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "docopt" | |||
version = "0.7.0" #:version | |||
version = "0.8.0" #:version |
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.
Please don't bump the version. I'll do that in a separate commit. :-)
docopt_macros/Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "docopt_macros" | |||
version = "0.7.0" #:version | |||
version = "0.8.0" #:version |
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.
Same as docopt
's Cargo.toml. I'll bump this version in a separate commit.
Fixed. |
Thanks!
Because not everyone can upgrade everything all the time. Think about Linux distros, company policies, etc etc. |
Should I revert version bump in readme as well? |
@ordian Yes please, good catch. |
This is a breaking change. * decode() is renamed to deserialize() for consistency with serde * docopt_macros: updated to latest nightly * ci: rust minimum version is bumped to 1.15 (for serde_derive)
How about enum with struct variant support? E.g. #[derive(Debug, Deserialize)]
enum CargoCommand {
Build {
flag_debug: bool,
flag_examples: bool,
},
Run {
...
},
Test,
Bench,
...
} |
@ordian I'd prefer that be separate. It has been discussed quite a bit on the issue tracker, but all the details have fallen out of my head. |
Thanks! This is awesome work. :-) |
:DDDD |
This is a breaking change.
for consistency with serde
Fixes #128, #213