6 ms·
What stuff are you running into with this? The vast majority of the ecosystem is on stable, but there are some holdouts. Working on them! I always like to hear
by steveklabnik 8y ago
What stuff are you running into with this? The vast majority of the ecosystem is on stable, but there are some holdouts. Working on them! I always like to hear people’s pain points, it helps with prioritization.
- gamache 8y agoI'm just a dabbler and most of my experience is a few months old -- I have no specifics for you, I'm afraid.
- vvanders 8y agoIf you're talking about Rocket that seems to be the largest thing that requires nightly. That said I can count on my hands the number of times I've used nightly over the last 2-ish years. It's pretty rare that you need to do it. I'll also add that I've actually been really impressed with how much attention Rust takes to not break stable packages. Between crater[1] and how aggressively they've cut point releases to fix any issues that (rarely) happen to slip by. [1] https://github.com/rust-lang-nursery/crater https://github.com/rust-lang-nursery/crater
- inferiorhuman 8y agoBindgen also wants nightly so if you're doing any FFI stuff you may be tethered to nightly.
- vvanders 8y agoYou sure about that? I've been using bindgen for ages on stable and just grabbed the latest version on an empty project and it still works for me.
- steveklabnik 8y agoI'm sitting next to bindgen's author in meatspace right now and he says yes, it has been on stable for a long time.
- inferiorhuman 8y agoAh sorry, was thinking of rustfmt-nightly, not the toolchain.
- deleted 8y ago[deleted]
- steveklabnik 8y agoNo worries! You shouldn't be using rustfmt-nightly at this point either; install the rustfmt-preview component through rustup. It works on stable!
- inferiorhuman 8y agoDoes rustfmt-preview work with bindgen though?
- steveklabnik 8y agoI don’t know what this sentence means.
- inferiorhuman 8y agoBindgen relies on rustfmt. With the codebase I'm using rustfmt-nightly works, but the stable version segfaults. Known issue but that's why I've stuck with rustfmt-nightly.
- steveklabnik 8y agoInteresting! I was not aware of that. So, no idea :)
- steveklabnik 8y agoIt's all good; I appreciate it anyway.
- golergka 8y agoThings do break if you use nightly – and if you ask for help in the community, "switch to nightly" is a very, very common advice.
- steveklabnik 8y agoThat's true. I do think that some people are too enthusiastic to recommend nightly; it happens when you have people who are really into where the language is going and want you to see the future rather than use something that works in the present.
- firebacon 8y agoJust yesterday our build broke because a cargo update pulled in some dependencies that suddenly required experimental features. I think it was crossbeam via hyper or tokio. Also, while I recognize it's a third party project, the hyper API keeps changing faster than I can adapt my code. If you are aware of a more stable HTTP server, ideally one that has proper TLS support and support for unix domain sockets, I would be very interested. EDIT: on the other hand, after working with rust daily for ~1.5 years, I have only run into one compiler bug and had zero actual bugs in my application due to language/compiler updates so far. There have been a few occasions were essential features were missing from the standard library/language though and several times were we had to backport some code to an older, stable rust version that we're one (when a developer had mistakenly tested their code locally with a newer version). The highest up on my wish list would be that - as I understand it - you can not currently exit the process cleanly (EDIT: early) with a non-zero exit code in stable rust. That makes it pretty hard to implement good command line utilities. Happy to be corrected if I am wrong on this one though.
- rabidferret 8y agoUnless I'm misunderstanding you, [`std::process::exit`](https://doc.rust-lang.org/nightly/std/process/fn.exit.html https://doc.rust-lang.org/nightly/std/process/fn.exit.html) does what you want.
- firebacon 8y agostd::process::exit does not call Drop traits (at least the last time I tried -- maybe I am doing it wrong?). So for example, if you're relying on Drop to clean up temporary files in the system, that will not happen. Providing no method to call destructors AND exit non-zero feels like a bug or missing feature. EDIT: to expand on this: a suggested workaround is to only call std::process::exit at the very end of the main function. But consider stuff like "env_logger::init". What about that? Ok, that doesn't use Drop and if it did you could put it into it's own scope I guess - so there are workarounds - but it in my opinion that gets pretty ugly. Comparing to c++, std::process::exit or panic! is like abort(), but what I want is a "return 1" from main.