-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Hello, and thanks for opening a new issue about Rocket!
Before opening your issue, we ask that you search through existing issues and
pull requests to see if your bug report, concern, request, or comment has
already been addressed. Ensure to search through both open and closed issues and
pull requests. If this is a question, feature request, or general comment,
please ensure that you have read the relevant sections of the documentation
before posting your issue. Finally, consider asking questions on IRC or Matrix
before opening an issue.
If you feel confident that your issue is unique, please include the following
information, selecting the category that best describes your issue:
Bug Reports
A project I'm maintaining that is based on Rocket compiled and ran fine 2 weeks ago (that is the last time I tried to compile it) on Windows 10.
Now, without any changes to the project repo whatsoever since then, that same project fails to compile.
Bug reports must include:
-
Rocket version: v0.2.0 and v0.2.2 (the behavior is more or less identical for both versions,
see the error logs below). I also use the latestrustc
nightly, currently this is
rustc 1.17.0-nightly (6eb9960d3 2017-03-19)
. -
A brief description of the bug that includes:
- The nature of the bug: Compile time error
- When the bug occurs: When trying to compile my rocket-based project. The project compiled fine just 2 weeks ago, and there have been 0 changes to the project source code since then.
- What you expected vs. what actually happened: I expected the project to compile fine, just as before. Instead I get the error log listed at the bottom.
-
How you discovered the bug. Short test cases are especially useful: I tried to compile my project using Windows 10.
-
Ideas, if any, about what Rocket is doing incorrectly: The only things I can think of atm are:
- Either some kind of relatively recent change to
rustc
itself androcket_codegen
not yet received the necessary changes to use the new code. UPDATE: This option is the most likely culprit, as downgrading torustc 1.17.0-nightly (824c9ebbd 2017-03-12)
makes the code compile again. - Or alternatively some source change to
rocket_codegen
that directly causes the issue.
- Either some kind of relatively recent change to
These ideas are directly derived from error message [E0023] below.
First, I tried compiling using the same old dependency version 0.2.0
:
joey@DESKTOP-P4V3PIP MINGW64 ~/WebstormProjects/quip-uservice (master)
$ cargo run
Compiling rustc-serialize v0.3.23
Compiling either v1.0.3
Compiling libc v0.2.21
Compiling winapi-build v0.1.1
Compiling winapi v0.2.8
Compiling unicode-xid v0.0.4
Compiling void v1.0.2
Compiling typeable v0.1.2
Compiling regex-syntax v0.3.9
Compiling quote v0.3.15
Compiling memchr v1.0.1
Compiling aho-corasick v0.6.3
Compiling unreachable v0.1.1
Compiling serde v0.9.11
Compiling num_cpus v1.3.0
Compiling unicode-normalization v0.1.4
Compiling ansi_term v0.9.0
Compiling utf8-ranges v1.0.0
Compiling synom v0.11.3
Compiling syn v0.11.9
Compiling utf8-ranges v0.1.3
Compiling traitobject v0.1.0
Compiling bitflags v0.7.0
Compiling xml-rs v0.3.6
Compiling serde v0.8.23
Compiling dtoa v0.4.1
Compiling serde_codegen_internals v0.14.1
Compiling regex-syntax v0.4.0
Compiling serde_derive v0.9.11
Compiling itoa v0.3.1
Compiling memchr v0.1.11
Compiling state v0.2.0
Compiling lazy_static v0.2.4
Compiling xmltree v0.3.2 (file:///C:/Users/Joey/WebstormProjects/xmltree-rs)
Compiling httparse v1.2.1
Compiling glob v0.2.11
Compiling itertools v0.5.9
Compiling matches v0.1.4
Compiling semver v0.1.20
Compiling unicode-bidi v0.2.5
Compiling rustc_version v0.1.7
Compiling log v0.3.7
Compiling hyper v0.10.5
Compiling unicase v1.4.0
Compiling mime v0.2.3
Compiling num-traits v0.1.37
Compiling version_check v0.1.0
Compiling aho-corasick v0.5.3
Compiling rocket_codegen v0.2.0
Compiling rocket v0.2.0
Compiling serde_json v0.9.9
Compiling num-integer v0.1.33
Compiling kernel32-sys v0.2.2
Compiling num-iter v0.1.33
Compiling num v0.1.37
Compiling toml v0.2.1
Compiling serde_xml v0.9.1
Compiling language-tags v0.2.2
Compiling idna v0.1.0
Compiling url v1.4.0
Compiling time v0.1.36
Compiling term v0.4.5
Compiling thread-id v2.0.0
Compiling thread-id v3.0.0
Compiling thread_local v0.2.7
Compiling thread_local v0.3.3
Compiling regex v0.1.80
Compiling regex v0.2.1
Compiling chrono v0.3.0
Compiling term-painter v0.2.3
Compiling cookie v0.6.1
Compiling qupa v0.2.0 (file:///C:/Users/Joey/WebstormProjects/qupa)
Compiling rocket_contrib v0.2.0
Compiling quip v0.2.0 (file:///C:/Users/Joey/WebstormProjects/quip)
error: no field `value` on type `&syntax::ast::Attribute`
--> C:\Users\Joey\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_codegen-0.2.0\src\lints/mod.rs:234:30
|
234 | true => attr.value.meta_item_list().and_then(|list| list[0].name())
| ^^^^^
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
--> C:\Users\Joey\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_codegen-0.2.0\src\lints\utils.rs:163:57
|
163 | | Def::Local(id) | Def::Upvar(id, ..) | Def::Macro(id) => Some(id),
| ^^^^^^^^^^^^^^ expected 2 fields, found 1
error: aborting due to 2 previous errors
error: Could not compile `rocket_codegen`.
Build failed, waiting for other jobs to finish...
warning: unused imports: `Date`, `Time`
--> C:\Users\Joey\WebstormProjects\quip\src\eval/mod.rs:15:32
|
15 | use self::datetime::{Duration, Date, DateTime, Time};
| ^^^^ ^^^^
|
= note: #[warn(unused_imports)] on by default
error: build failed
Then, I update the Rocket dependencies to 0.2.2
:
joey@DESKTOP-P4V3PIP MINGW64 ~/WebstormProjects/quip-uservice (master)
$ cargo update && cargo run
Updating registry `https://github.com/rust-lang/crates.io-index`
Updating rocket v0.2.0 -> v0.2.2
Updating rocket_codegen v0.2.0 -> v0.2.2
Updating rocket_contrib v0.2.0 -> v0.2.2
Compiling rocket v0.2.2
Compiling rocket_codegen v0.2.2
Compiling rocket_contrib v0.2.2
error: no field `value` on type `&syntax::ast::Attribute`
--> C:\Users\Joey\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_codegen-0.2.2\src\lints/mod.rs:232:30
|
232 | true => attr.value.meta_item_list().and_then(|list| list[0].name())
| ^^^^^
error: aborting due to previous error
error: Could not compile `rocket_codegen`.
To learn more, run the command again with --verbose.