Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upGetting started is horribly, horribly out of date #423
Comments
This comment has been minimized.
|
Hi, thanks for reaching out and writing an issue instead of just giving up and moving on! (Something I'm sure guilty of…) So, with 0.7, the codegen story change a bit, which is why the getting started guide is probably out of date. This is being worked on! In PR #404 you can see we are about to add the example code from that guide to this repository. As the changelog entry for 0.7 (here) mentions, "diesel_codegen has been split into two crates." @sgrif wrote a bit in this commit message on how to migrate. Your error—thanks for adding this—already mentions what the problem is: There are two different versions of syntex in use. I admit, that's a bit hard to read You are using diesel_codegen_syntax in version 0.7.2, right? That version has an upper bound on syntex version 0.43 (you mentioned 0.42 above). So, try to use 0.43? Can you check in your I hope that helps—this is just me guessing, actually… |
This comment has been minimized.
|
Sorry, I've been short on time. I will make sure the guides are up to date this weekend. |
This comment has been minimized.
stephen-standridge
commented
Sep 2, 2016
|
That did it @killercup, thank you! This is my first rust project, so I'm still learning many of the debugging skills. Now I know version management is an active process with cargo. @sgrif Thank you! I'm really glad this project exists and that you all are so responsive with it! |
stephen-standridge
closed this
Sep 2, 2016
stephen-standridge
reopened this
Sep 2, 2016
This comment has been minimized.
devinrsmith
commented
Sep 5, 2016
|
I'm just getting started and have been having a bad time. I've been following the current guide http://diesel.rs/guides/getting-started/ using the specific rust nightly. This issue is specifically labeled as "out of date", but I was under the impression that given rust's semantic versioning, old rust examples should just work. But it won't even start compiling. $ cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
error: Package `diesel_codegen v0.7.0` does not have these features: `nightly`Removing the nightly feature from the toml gets a bit further, but quickly runs into compile errors: /Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:13:66: 13:80 error: type name `ast::TokenTree` is undefined or not in scope [E0412]
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:13 pub fn expand_dotenv<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
^~~~~~~~~~~~~~
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:13:66: 13:80 help: run `rustc --explain E0412` to see a detailed explanation
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:13:66: 13:80 help: you can import it into scope: `use syntax::tokenstream::TokenTree;`.
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:25:50: 25:64 error: type name `ast::TokenTree` is undefined or not in scope [E0412]
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:25 fn expand_env(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
^~~~~~~~~~~~~~
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:25:50: 25:64 help: run `rustc --explain E0412` to see a detailed explanation
/Users/dsmith/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv_codegen-0.8.1/src/dotenv_macro.rs:25:50: 25:64 help: you can import it into scope: `use syntax::tokenstream::TokenTree;`.
error: aborting due to 2 previous errorsI'm new to rust, so I'm not sure where to turn to next. I'm not sure where the issue lies. Is this an issues with diesel? Is this an issue with a dependency? Is the guide in error? Did somebody break the semantic versioning rules such that the example no longer works now? If so, can the example be updated with very specific versions to get things running? Am I using the wrong nightly? When a large public project such as diesel doesn't compile, especially given a "getting started" guide, it reflects poorly on rust IMO. Hoping this can be resolved quickly! |
This comment has been minimized.
Emilgardis
commented
Sep 6, 2016
•
|
@devinrsmith
This solution is not pretty, but it works. These problems come from that diesel only "supports" new nightly releases with steps of 6 weeks. I've also just started using diesel, and this was a huge As a sidenote, the getting started guide is probably one of the best I've seen, I even learnt something new about how cargo treats --bin. |
This comment has been minimized.
|
@Emilgardis I know you disagree with our nightly support policy but please don't start commenting on every issue complaining about it. |
This comment has been minimized.
Emilgardis
commented
Sep 6, 2016
•
|
This was my first comment on diesel (?). And I can understand the decision you've made, it makes sense. Edit:: To add some value to this comment, what do you think of the idea @killercup had? |
This comment has been minimized.
|
My bad I thought you were someone who had opened another issue. |
stephen-standridge commentedSep 1, 2016
•
edited
Hello!
I've attempted to use diesel because I really like the interface, however I've been in getting started hell for a while now.
I ran into several issues around the diesel_codegen version, which I've fixed with a lot of time spent in this repository's issues section. Now I'm attempting to get diesel to compile for stable and am running into all sorts of version mismatches with syntex and am starting to wondering if this project actually works for anyone.
This is after having moved my
externdefinitions outside of the main body, after trying the syntex version specified in getting_started0.31, as well as internet-suggested versions like0.38, and0.42. I'm running out of things the internet says to try.The barrier of entry to using this is real, the main issue here is that the getting_started isn't up to date. I would totally put a pull request up against it if only I could get it to work.
Thanks for all the hard work you've put into this, it was fun trying to use it!