Closed mosteo closed 1 year ago
The new language version is backwards compatible, so even in Ada22 mode Alire should compile as is. The only potential problem will be when building in dev or validation modes because of warnings and style checks. But that's also the case for any new version of the compiler.
As long as we don't plan to use Ada22 feature, I think it's ok to leave it as is.
I was thinking for example of the reported problems with ambiguities with new subprograms in the containers library, but I see that that should be fixed at some point by AI12-0400-1.
And indeed it's true that compiler version changes are a more usual source of corner cases, but as you say in release mode it shouldn't be that critical, and we don't want to pin compilers anyway.
I have realized that we are currently using the compiler default for the Ada version in our generated config. So, when at some point GNAT compilers default to Ada 2022, this may break crates as is usual in corner cases with ambiguities, access checks...
It would be safer if we fixed the version to be used with the crate at the point of creation. This would mean to add to our default
alire.toml
the following:This probably can be incorporated to the questions we ask during
alr init
, so the user can pick another version at that time without needing to edit the manifest.Any drawbacks with this plan?
In regard to existing crates, I guess it would be preferable for the version used in generated
config/
to default forever to Ada12, as current crates without override in the manifest will I guess all be using that default.