Closed caspermeijn closed 5 months ago
Hii, two things 😊
1) Why are we testing against old editions?
https://doc.rust-lang.org/edition-guide/editions/#editions-do-not-split-the-ecosystem
The most important rule for editions is that crates in one edition can interoperate seamlessly with crates compiled in other editions. This ensures that the decision to migrate to a newer edition is a "private one" that the crate can make without affecting others.
2) Maybe the test-2018 addition should be made into a separate PR so that we can discuss 1) separately without blocking this one for #1036
- Why are we testing against old editions?
I am not sure, but I assume this is because we generate code that must be compatible with older and newer editions. For example, in some test code is a cfg_if
that adds extern crate
statements for 2015 edition only.
Well, I see two options:
tests-2018
crate. I mostly did this because the tests-2015
crate exists. I am not sure what the added value is over just running the tests with the oldest edition.tests
crate to edition 2021 and don't explicitly test 2018. I am fine with that, as I think the difference between 2018 and 2021 is small enough to not cause any problems.What do you think is best?
we generate code that must be compatible with older and newer editions.
Ahh, I see. Makes perfect sense.
Also agree that it's worth testing against the 2018 edition given that it's quite easy.
The published crates were already using edition 2021. Update all internal crates as well.
Also add a new tests-2018 crate that runs all tests using edition 2018.