News for hackers. Stuff that matters.
Re:Rust 1.x seems to not always be backward compatible in pr... by dathinab on Sunday June 13, 2021 @09:45AM (#27492540)
> Rust is just too young and moves to fast to be used for software projects you want other people to be able to compile.

Except many people doing exactly that and it working fine.

> backwards compatibility problems

Which aren't really a problem in practice. Definitely not worse then in any other language, yes there was some intentional breakage (soundness bug fixes) and unintentional breakage (compiler bugs) but most of this was in the very early stable rust versions since then accidental breakage which isn't caught and fixed before stable has become quite rare. As far as I know rust does more to find accidental breakage then many other languages.

> They always use $latest and what is in $latest changes so fast even if your rustc is 4 months old it already can't compile code written in $latest.

What is the problem with requiring a up-to date build chain? Slow long release cycles with a lot of patch back-porting is a software development model which for many (most?) projects has been deemed to not work well and has been replaced with something more in the direction of CI. Let's be honest even if we assume slow long releases are better for compilers, they still put quite an additional burden one the compiler development process which a is feasible if you have a lot of payed devs from large companies, but not really if only your core devs are payed (by the foundation and/or companies) but a lot of relevant contributions come from people not directly payed to work on rust.

> But right now it's painful and full of pitfalls.

I don't think so, but I guess we both can agree that thinks are improving, for me to make it even better and for you to maybe make it usable for the things you currently treat it as not suited for. ;-)

Re:Rust 1.x seems to not always be backward compatible in pr... by superkuh on Sunday June 13, 2021 @09:54AM (#27492622)
>What is the problem with requiring a up-to date build chain?

Well, Debian Bullseye, a distro that hasn't even been released yet, already has a rustc that's so out of date (ie, ~5 months, 1.48) that it can't compile code written today using today's features. I guess if you come from the web or some "fast" internet company where you rebuild your entire world every day then 5-6 months is an eternity. But with, say, c++, I can expect to be able to compile C++ programs written by devs for a handful of years before C++?? issues start. And despite Bash 5 getting new features regularly I can expect a bash script written today to work on my 15 year old desktop running linux 2.6. It's not because these languages don't add new backwards incompatible features. It's because the devs don't immediately use them and say, "What is the problem with requiring a up-to date build chain?"

If you only talk to other bleeding edge devs in the rust community I can see how this ethos propagates. But not everyone is a bleeding edge rust dev. Some of us run our distros for many years and just want to compile programs.

Requiring the use of rust-up instead of using system repos is the often suggested way around this. But I, and many others, absolutely hate using third party compiler software from out of repos. It's a bad practice and leads to it's own trouble as shown the very topic this discussion thread is about.

Re:Rust 1.x seems to not always be backward compatible in pr... by dathinab on Sunday June 13, 2021 @10:16AM (#27492801)
But rust is a compiler, i.e. a dev tool.

It's not a problem of running rust code, you always can run any "latest" compiled rust code with Debian Bullseye. Only for building the binary do you need a up to date version.

But this isn't uncommon for a lot of projects which might require up to date build tools for them to be build.

I my opinion, and I know many do disagree with me, the problem is the idea of pinning dev-tools when releasing a distribution and expecting this to work well. In my experience it doesn't, and it's not limited to rust or web-related things where it doesn't work well.

(Like e.g. I don't know how often I had to install newer versions of clang, gcc, C++-related build tools, python related build tools, system dependencies, java etc.)

Re:Rust 1.x seems to not always be backward compatible in pr... by jen20 on Sunday June 13, 2021 @10:56AM (#27493162)
> Well, Debian Bullseye, a distro that hasn't even been released yet, already has a rustc that's so out of date (ie, ~5 months, 1.48) that it can't compile code written today using today's features.

This sounds more like an argument against Debian’s packaging practices than Rust. Debian is full of out-of-date tools, and that and CentOS doing the same are the reason non-system package managers are so popular.

Re:Rust 1.x seems to not always be backward compatible in pr... by gspr on Sunday June 13, 2021 @11:32AM (#27493420)
It's not a problem with mature languages though.
Re:Rust 1.x seems to not always be backward compatible in pr... by jen20 on Sunday June 13, 2021 @01:33PM (#27494449)
Depending on what you consider “mature”, sure. Here is a short list of programming languages where I have had to install an up-to-date version on recent Debian, Ubuntu or RHEL derivatives in just the last month:

- Node.js

- Python

- Go

- Rust

- C++

- .NET Core

- Java

None had an up-to-date version in the distribution repositories. It’s a problem - and for those who defend it as otherwise while lamenting the rise of Docker, perhaps it’s worth some careful introspection about what a majority of people actually want from an operating system distribution, and whether the concept is in fact a relic of the days when software was distributed on CDs via the mail.

Re:Rust 1.x seems to not always be backward compatible in pr... by gspr on Monday June 14, 2021 @03:00AM (#27500048)
Really? For what reason did you have to install a newer Python, a newer C++ compiler, or a newer Java runtime?

> None had an up-to-date version in the distribution repositories.

Of course not. A Debian release is meant to not change – except for security fixes – for the duration of its 2 year cycle. That's a feature, not a bug.

Re:Rust 1.x seems to not always be backward compatible in pr... by jen20 on Tuesday June 15, 2021 @12:37AM (#27511347)
To run software written using them.

Operating systems are servant of their applications, not vice versa.

Re:Rust 1.x seems to not always be backward compatible in pr... by Xylakant on Sunday June 13, 2021 @01:44PM (#27494548)
What’s a mature language then? I’ve encountered this issue with rust, php, ruby, nodejs, python , java.
Re:Rust 1.x seems to not always be backward compatible in pr... by zxzax on Sunday June 13, 2021 @10:10AM (#27492749)
I don't see how that's different to C++. You will run into the same issues there if you happen to use code that uses some of the various new features e.g. items targeted for C++23, that are already starting to be supported by the newest versions of GCC and Clang. If you're on Debian Stable or RHEL, I believe those are even still using GCC versions that don't fully support C++20.
Re:Rust 1.x seems to not always be backward compatible in pr... by steveklabnik on Sunday June 13, 2021 @10:16AM (#27492795)
Their argument is a cultural one, not a technical one. Technically, they’re the same, but culturally, C++XY takes time to see adoption, but Rust 1.Y tends to be adopted almost immediately.
Re:Rust 1.x seems to not always be backward compatible in pr... by zxzax on Sunday June 13, 2021 @10:19AM (#27492827)
On certain corners of Github, I wouldn't say so. I think you would see a lot more people doing the same thing in C++, if there was a Cargo-style package manager that got more adoption there.
Re:Rust 1.x seems to not always be backward compatible in pr... by spinax on Sunday June 13, 2021 @10:47AM (#27493077)
> Well, Debian Bullseye, a distro that hasn't even been released yet, already has a rustc that's so out of date (ie, ~5 months, 1.48)

Sadly, Debian does this a lot - Bullseye is going to release with NodeJS v12 which is already in Maintenance LTS (dying) and not the Active LTS (v14) and has 4 more newer Current releases (15->18). I am a Debian supporter but this is a distro problem of locking in on already out of date dev tools over and over again, Bullseye is already far out of date before it's even launched.

https://packages.debian.org/search?keywords=nodejs&searchon=...

https://nodejs.org/en/about/releases/

Re:Rust 1.x seems to not always be backward compatible in pr... by akiselev on Sunday June 13, 2021 @12:43PM (#27494052)
Debian has an explicit stability guarantee:

> This is what Debian's Stable name means: that, once released, the operating system remains relatively unchanging over time. [1]

If you just want to compile programs, perhaps a distro + release channel geared towards production server deployments isn't the best choice. They even call out that fact in the "Why Debian" page:

> You can fine-tune the degree of risk you want to take, since Debian has three separate releases: Stable, Testing, and Unstable. On some of our machines (the server, the kiosk machines) we run 'stable'. Some of the other systems (individual work-stations) run various combinations of testing/unstable. (Note that there are no security updates for testing). I run some stuff from experimental on my own work-station. What's great is the ability to make finely graded decisions for different machines serving different functions. But even the more adventurous choices are solid enough that they virtually never break. And `stable' just never breaks ;-). [2]

[1] https://wiki.debian.org/DebianStability

[2] https://wiki.debian.org/WhyDebian#Why_Linux.3F_Why_Debian.3F