Skip to content
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

Deprecation warning/error with json-rust 0.9.0 #74

Closed
kondrak opened this issue Jul 16, 2016 · 6 comments
Closed

Deprecation warning/error with json-rust 0.9.0 #74

kondrak opened this issue Jul 16, 2016 · 6 comments

Comments

@kondrak
Copy link

kondrak commented Jul 16, 2016

Thanks for pushing the requests so quickly! :) However, when trying to compile a new cargo project with json 0.9.0, 2 deprecation warnings are being generated:

-*- mode: compilation; default-directory: "d:/hello_world/" -*-
Compilation started at Sat Jul 16 20:01:46

make -k 
RUST_BACKTRACE=1 cargo run
   Compiling bitflags v0.7.0
   Compiling ftoa v0.1.1
   Compiling itoa v0.1.1
   Compiling xml-rs v0.3.4
   Compiling json v0.9.0
C:\Users\(...)\json-0.9.0\src\lib.rs:238:1: 238:63 error: `#[deprecated]` attribute is unstable (see issue #29935)
C:\Users\(...)\json-0.9.0\src\lib.rs:238 #[deprecated(since="0.9.0", note="use `json::Error` instead")]
                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\(...)\json-0.9.0\src\lib.rs:241:1: 241:64 error: `#[deprecated]` attribute is unstable (see issue #29935)
C:\Users\(...)\json-0.9.0\src\lib.rs:241 #[deprecated(since="0.9.0", note="use `json::Result` instead")]
                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
Build failed, waiting for other jobs to finish...
Could not compile `json`.

Since it's set to treat deprecations as errors, maybe just remove them altogether?

@maciejhirsz
Copy link
Owner

#[deprecated] is stable since Rust 1.9 IIRC, which version are you on?

@kondrak
Copy link
Author

kondrak commented Jul 16, 2016

I'm using 1.9

@kondrak
Copy link
Author

kondrak commented Jul 16, 2016

I checked and it does indeed say that this is a stable attribute since 1.9. Now that you mention it, I'll try and update to 1.10 and see if the problem persists.

@maciejhirsz
Copy link
Owner

That's weird, I'm unable to reproduce.

The error you are getting points to the issue, which states that the attribute is deprecated:
rust-lang/rust#29935 (comment)

I did use #[deprecated] before 0.8, haven't heard about compiler issues then.

I could remove, it actually doesn't do anything - Rust atm only respects it on function heads, I kinda added it for the future. Let me know how it goes.

Side note: I strongly recommend rustup for managing rust versions.

@kondrak
Copy link
Author

kondrak commented Jul 16, 2016

I am using rustup :)
I just updated to 1.10 and the problem is gone... so I'm not sure what was the initial cause. Thanks for the hint, I should've checked and updated in the first place!

@kondrak kondrak closed this as completed Jul 16, 2016
@maciejhirsz
Copy link
Owner

Cool, glad it worked!

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

No branches or pull requests

2 participants