jwilm / racerd

Rust semantic analysis server powered by Racer
http://jwilm.github.io/racerd/libracerd/
Apache License 2.0
134 stars 24 forks source link

Update to url 1.x #50

Closed rillian closed 8 years ago

rillian commented 8 years ago

With rust 1.11.0 (stable) cargo warns about deprecated Cargo.toml syntax in the url 0.5.9 crate.

warning: TOML file found which contains invalid syntax and will soon not parse
at `/home/giles/.cargo/registry/src/github.com-1ecc6299db9ec823/url-0.5.9/Cargo.toml`.

The TOML spec requires newlines after table definitions (e.g. `[a] b = 1` is
invalid), but this file has a table header which does not have a newline after
it. A newline needs to be added and this warning will soon become a hard error
in the future.

Racerd doesn't depend on the (now stable) url crate directly but it does through hyper and iron. Both have had minor revision bumps to update to the 1.x release of the crate, but other changes mean some code changes are necessary to complete the update.

rillian commented 8 years ago

For example cargo update && cargo build fails with

   Compiling libracerd v0.2.0 (file:///home/giles/projects/racerd)
build.rs:18:29: 18:42 error: mismatched types [E0308]
build.rs:18     serde_codegen::register(&mut registry);
                                        ^~~~~~~~~~~~~
build.rs:18:29: 18:42 help: run `rustc --explain E0308` to see a detailed explanation
build.rs:18:29: 18:42 note: expected type `&mut syntex::Registry`
build.rs:18:29: 18:42 note:    found type `&mut syntex::Registry`
build.rs:18:29: 18:42 note: Perhaps two different versions of crate `syntex` are being used?
build.rs:18     serde_codegen::register(&mut registry);
                                        ^~~~~~~~~~~~~
error: aborting due to previous error
error: Could not compile `libracerd`.

It looks like serge and syntax need updating together?

jwilm commented 8 years ago

Hey Ralph,

Thanks for the report! Syntex shouldn't be required as a dependency for serde anymore (although we may need to upgrade to 0.8). If you want to build with the latest racer, you can always reset your repo and cargo update -p racer instead of upgrading everything. I'll try and make some time this weekend to do the upgrades otherwise.

rillian commented 8 years ago

Thanks. It was actually the deprecation warning I was trying to fix, figuring it was something that needed doing, when I noticed most everything is out of date.