What does HackerNews think of crater?

Run experiments across parts of the Rust ecosystem!

Language: Rust

yup, they reference it as an inspiration: https://github.com/rust-lang/crater

it's probably impossible to automate an entire ecosystem, and there is value to enabling a tighter integration within a project ecosystem (a subset of the language ecosystem).

Rather than hypothesising about an imagined tool you could look at the actual tool which of course is in Rust's source code repo: https://github.com/rust-lang/crater

> new proposed C++ changes - are checked against only easily and "well-known" accessible package.

Now that I have, so to say, shown you mine, lets see yours. Where is the tool to perform these checks in C++?

> Crater is a tool for compiling and running tests for every crate on crates.io (and a few on GitHub). It is mainly used for checking the extent of breakage when implementing potentially breaking changes and ensuring lack of breakage by running beta vs stable compiler versions.

https://rustc-dev-guide.rust-lang.org/tests/crater.html

https://github.com/rust-lang/crater

https://crater.rust-lang.org/

Even then such a bug as GHC's can conceivably not be detected.

You cut out a key word:

> Linux is really hurt here by the total lack of any unit testing or UI scripting standards.

> standards

I've been very impressed reading how the Rust developers handle this. They have a tool called crater[1], which runs regression tests for the compiler against all Rust code ever released on crates.io or GitHub. Every front-facing change that is even slightly risky must pass a crater run.

https://github.com/rust-lang/crater

Surely Microsoft has internal tools for Windows that do the same thing: run a battery of tests across popular apps and make sure changes in the OS don't break any user apps.

Where's the similar test harness for Linux you can run that tests hundreds of popular apps across Wayland/X11 and Gnome/KDE/XFCE and makes sure everything still works?

Thinking about the dangers of subtle incompatibilities, I think the existence of crater[1] could make a huge difference, once alternative implementations are far enough along.

Arguably the nearest thing to a specification for the Rust language at present is "what crater would be happy with".

That seems more useful than thinking of rustc as a reference implementation, because when I read the release notes every now and again they say things to the effect of "this change is technically backwards-incompatible but crater reassures us that it won't cause anyone any trouble".

[1] https://github.com/rust-lang/crater

I agree with this 100%. I recently tried to update an old iOS app written in Swift. I would have to install an older version of Xcode to upgrade Swift from version 2 to 3, and then use the latest Xcode upgrade from 3 to 4. Then I'd have to update every single dependency and figure out any breaking changes. I wanted to see if I could hire someone to help me with this, but they just gave up after looking at it, and recommended rewriting the whole project from scratch. (It's a hobby project so I don't have the budget for a rewrite.)

This is generally how dependencies work across all languages and frameworks, and I think the status quo is extremely inefficient. When a library maintainer releases updates with breaking changes, we waste thousands of developer-hours on upgrades and fixing all these changes.

I've been thinking about a new kind of package manager and repository that strictly enforces a certain level of test coverage, and also forces library maintainers to codify the upgrade process. For example, if you decide that you want to rename a `get` method in `v0.1.0` to `fetch` in `v1.0.0`, then your `v1.0.0` release MUST include an automated code-mod script that automatically runs when a developer updates the library version. This wouldn't work so well for dynamically typed languages, but this rename example should work flawlessly in a statically-typed language.

The code-mod script should also include lots of test cases, and be tested on lots of other real-world libraries. Similar to how Rust developers detect regressions in the Rust compiler by building a large number of crates.

There's probably a lot of reasons why this wouldn't work in the real world, but one can dream! There was a lot of controversies when Elm made this kind of decision about their package ecosystem and removed native modules [2]. Deno is working on a high quality Standard Library [4] with no external dependencies, and where all code is reviewed by the Deno core team (and presumably with a high level of test coverage.)

[1] https://github.com/rust-lang/crater

[2] https://dev.to/kspeakman/elm-019-broke-us--khn

[3] https://news.ycombinator.com/item?id=17842400

[4] https://deno.land/std

Clang is the lucky one here, it has both SQLite and Dr Hipp on its side.

Rust has Crater which allows new rustc builds to be run against the entire public crates.io dgraph.

https://github.com/rust-lang/crater

There's a neat tool called crater (https://github.com/rust-lang/crater) for Rust. It can run an experiment across every Rust package (or every popular one), so you can e.g see if some theoretically breaking compiler change actually hits anyone. Something like that could be interesting for node packages as well.
Check out crater: https://github.com/rust-lang/crater

The rust devs recompile a huge chunk of the entire rust ecosystem to make sure new compiler versions don't break things.

I can't imagine something like this being even close to feasible in the C++ ecosystem; there is too little standardization of build tooling, too much brittle/broken code.

Still it's not cheap and Amazon is paying, bless their hearts and excess compute capacity when it's not Christmas.

> Yet they do pay off in Rust because of my favourite Rust feature: the ability to refactor large-scale software without breaking anything

I think crater also deserves some credit here - given how much Rust source is in Cargo, it's very useful to be able to run a refactored compiler against all those packages and see which don't compile or start failing their unit tests.

[1] https://github.com/rust-lang/crater