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

Compile fails with latest nightly (as of 2018-06-11) #660

Closed
bsjaekel opened this issue Jun 11, 2018 · 12 comments
Closed

Compile fails with latest nightly (as of 2018-06-11) #660

bsjaekel opened this issue Jun 11, 2018 · 12 comments
Labels
nightly breakage Breakage on the nightly channel only

Comments

@bsjaekel
Copy link

Hi,

I was playing around with Rocket and Rust using the helloworld example from https://rocket.rs/guide/getting-started. I first tried on my private laptop a few days ago and was very satisfied with the results. Today (2018-06-11) i tried to get everything running on my laptop at work and compilation fails with the following message:

Compiling rocket_codegen v0.3.12
error[E0432]: unresolved import `syntax::parse::common`
 --> /home/sja/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.3.12/src/utils/parser_ext.rs:5:20
  |
5 | use syntax::parse::common::SeqSep;
  |                    ^^^^^^ Could not find `common` in `parse`

error[E0624]: method `parse_seq_to_end` is private
  --> /home/sja/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.3.12/src/utils/parser_ext.rs:13:14
   |
13 |         self.parse_seq_to_end(&Eof,
   |              ^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

Some errors occurred: E0432, E0624.

I am using the latest nightly as of today. I am running everthing on my Linux(Linux 4.14.48-2-MANJARO #1 SMP PREEMPT Fri Jun 8 20:41:40 UTC 2018 x86_64 GNU/Linux) Laptop and used rustup to install nightly versions.

I have switched over to the nighly nightly-2018-06-09-x86_64-unknown-linux-gnu (default) and everything compiles fine. So i assume it has something to do with Rust itself affecting Rocket.

Investigating further and reading the suggested error messages did not help for me as i am still not that familiar with Rust.

Regards

Sebastian

@mati865
Copy link

mati865 commented Jun 11, 2018

It was caused by this PR rust-lang/rust#51265

@jebrosen
Copy link
Collaborator

I am testing a fix and will file a PR against rust-lang/rust when I've confirmed it.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 11, 2018
…Simulacrum

Make parse_seq_to_end and parse_path public

(see rwf2/Rocket#660, rust-lang#51265)

Rocket currently uses `parse_seq_to_end` and `parse_path` in its codegen macros. Assuming I tested correctly, this is the minimal set of methods that are currently necessary to build Rocket again. I would be happy to add documentation of this and Rocket's other usages, if desired.
@SergioBenitez SergioBenitez added the nightly breakage Breakage on the nightly channel only label Jun 12, 2018
@jebrosen
Copy link
Collaborator

In addition to rust-lang/rust#51502, this change was needed to keep up with the reorganization:

diff --git a/codegen/src/utils/parser_ext.rs b/codegen/src/utils/parser_ext.rs
index 44f18fa..9909e8e 100644
--- a/codegen/src/utils/parser_ext.rs
+++ b/codegen/src/utils/parser_ext.rs
@@ -1,8 +1,7 @@
 use syntax::parse::parser::{PathStyle, Parser};
-use syntax::parse::PResult;
+use syntax::parse::{SeqSep, PResult};
 use syntax::ast::Path;
 use syntax::parse::token::Token::{Eof, Comma};
-use syntax::parse::common::SeqSep;
 
 pub trait ParserExt<'a> {
     fn parse_paths(&mut self) -> PResult<'a, Vec<Path>>;

I will likely be on vacation by the time this is resolved, and I didn't want to submit a PR for it without knowing which nightly will have the fix.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 12, 2018
…Simulacrum

Make parse_seq_to_end and parse_path public

(see rwf2/Rocket#660, rust-lang#51265)

Rocket currently uses `parse_seq_to_end` and `parse_path` in its codegen macros. Assuming I tested correctly, this is the minimal set of methods that are currently necessary to build Rocket again. I would be happy to add documentation of this and Rocket's other usages, if desired.
@mboogerd
Copy link

I'm still a newbie with Rust, and this is my first time trying both nightly and Rocket. Until this is completely resolved, what is the recommended way of getting my project to compile again?

@avrong
Copy link

avrong commented Jun 13, 2018

@mboogerd you can update to the latest rust nightly and edit cached file (where error happens) as @jebrosen said

@mboogerd
Copy link

I had realized the nightly update, but I had not interpreted @jebrosen's comment as something that I should be doing in my cache (noobiness showing through). It did work though, thanks for the tip @avrong :)

@bsjaekel
Copy link
Author

@mboogerd last working nightly for me was nightly-2018-06-09.

@jebrosen
Copy link
Collaborator

nightly-2018-06-09 is a working nightly build for both master and 0.3.12.

With rust-lang/rust#51502 merged, a new Rocket 0.3 release can be made that works with the latest nightly builds.

Unfortunately, due to an oversight on my part, another PR will probably need to be made for rust-lang/rust before master can be fixed.

@skondrashov
Copy link

rustup default nightly-2018-06-09 for the noobs looking for something to paste (like I was)

@mbilker
Copy link

mbilker commented Jun 14, 2018

Or if you have multiple projects like myself and want to override the nightly version for a single project:

rustup override set nightly-2018-06-09

Please see https://github.com/rust-lang-nursery/rustup.rs#toolchain-override-shorthand for more details regarding rustup override

@jebrosen
Copy link
Collaborator

The master branch uses these methods in addition to those used in 0.3 that would need to be made public: parse_optional_str and mk_mac_expr. There was also one deleted method: parse_seq. It looks like some of these could be implemented in Rocket in parser_ext.rs, but I didn't spend too much time trying.

maelvls added a commit to maelvls/touist-editor that referenced this issue Jun 15, 2018
rwf2/Rocket#660

remember to go back to normal nightly asap
@SergioBenitez
Copy link
Member

Fixed in v0.3.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nightly breakage Breakage on the nightly channel only
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants