6 ms·
Firefox might be a pretty bad example here. IIRC it was only recently they stopped using the undocumented RUSTC_BOOTSTRAP to enable unstable nightly features in
by heftig 5y ago
Firefox might be a pretty bad example here. IIRC it was only recently they stopped using the undocumented RUSTC_BOOTSTRAP to enable unstable nightly features in stable Rust.
- gpm 5y agoIt looks like they still use that in a bunch of places? https://github.com/mozilla/gecko-dev/search?q=RUSTC_BOOTSTRAP https://github.com/mozilla/gecko-dev/search?q=RUSTC_BOOTSTRA... Specific example: https://github.com/mozilla/gecko-dev/blob/d36cf98aa85f24ceefd07521b3d16b9edd2abcb7/taskcluster/docker/image_builder/Dockerfile#L73 https://github.com/mozilla/gecko-dev/blob/d36cf98aa85f24ceef...
- heftig 5y agoOh, I see. I only vaguely remembered some changeset regarding it. I must have been mistaken, then, and it's still in use. In any case, sneakily using nightly features can make using a different Rust version problematic, since these features are free of any stability guarantees. Arch Linux carries a rather large patch updating some vendored dependency in order to make Firefox 78 compile with a newer Rust. https://github.com/archlinux/svntogit-packages/tree/packages/js78/trunk https://github.com/archlinux/svntogit-packages/tree/packages...
- kzrdude 5y agopacked_simd is accounting for the diff there, and it is still a nightly-only (meaning experimental features) crate, so looks like it's still using that.
- deleted 5y ago[deleted]
- kzrdude 5y agoWhat a confusing codebase. https://github.com/mozilla/gecko-dev/tree/d36cf98aa85f24ceefd07521b3d16b9edd2abcb7/third_party/rust/xmldecl https://github.com/mozilla/gecko-dev/tree/d36cf98aa85f24ceef... This package documents a "minimum supported rust version" then goes on to set RUSTC_BOOTSTRAP (cirumventing, enabling experimental features). Very mixed signals - I'm pretty disappointed to see documentation say one thing and then the code do another. I would suspect the developers are maybe not entirely in tune with the Rust ecosystem, and that would make sense, they have more important stuff to do, like building Firefox, than playing with Rust. :)
- steveklabnik 5y agoThey are well aware of what they’re doing. I personally find it extremely unfortunate but, nothing we can really do. Luckily as far as I know this is the only serious mis-use of the bootstrap flag. This would be a bigger problem if more people misused it. (And it has, in the past, when people used those packages. There was a relatively high-profile Debian situation about it a while back…)
- muizelaar 5y agoI'm pretty sure all uses of RUSTC_BOOTSTRAP are to get around limitations in Rust's SIMD support. The main users are encoding_rs which depends on packed_simd and qcms which needs NEON support. So it's not like we're going around using all sorts of unstable features. It's very targeted and at least in qcms's case unlikely to change before stabilization.
- deleted 5y ago[deleted]
- hsivonen 5y agoThe crate linked to from the comment you replied to uses RUSTC_BOOTSTRAP for a non-SIMD reason: To allow Firefox to be built with somewhat old rustc. Firefox no longer updates its MSRV in sync with Rust release trains. I’d be happy to remove this particular RUSTC_BOOTSTRAP if we decided to increase Firefox’s MSRV (currently stuck at 1.47.0).
- chrismorgan 5y agoYeah, Firefox is pretty much the worst example imaginable, because it deliberately depends on unstable (as in, actually unstable, not just de-facto-stable-but-not-yet-formally-stable) features, pretty much guaranteeing that upgrades of the compiler will break things regularly. Firefox is effectively targeting a nightly compiler, they just use this sneaky underhanded trick to access the features in a stable release. Hmm. It could be nicer for stability reasons if Firefox pinned a specific nightly compiler rather than using a nominated stable release plus the RUSTC_BOOTSTAP trick. But I can understand why they would prefer the stable release. Anyway: in short, the premise of this article is incorrect because Firefox cheated.