Fix null annotations Configuration class - #5639
Conversation
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
0d7be77 to
98893fc
Compare
|
Very much appreciated. I once tried to get #4859 merged, but somehow it got stuck. Changes to configuration class seemed similar. |
|
But I got stalled on this. It looks like most of the code assumes the configuration map cannot have null values. So forcing that would make sense. But then I discovered some code that adds null values for configuration parameters with required defaults from config descriptions if not set. So one would have to have these values Nullable. But that's a big undertaking, as you can see. I am not at the end of it in core, and addons will not compile when doing this. So I am not sure anymore I can reasonably finish this without creating a lot of risk everywhere. |
|
I tried the all-in approach, fixing all in core and I also had the PR for add-ons at hand. No chance to have this rebased until it is reviewed 😱 So I would recommend to start with smaller chunks like Configuration (unfortunately it is not really small). Prepare the core PR and the add-ons PR. If you need to many hacks to get add-ons compiling, the approach probably does not work due to different assumptions on both sides. You may get rid of SAT warnings and get compiler warnings instead (or even ugly Maybe you can take parts of my old PR. I am not sure if I always took the right decision, but overall it was at least compiling. |
|
I also tried to add the missing null annotations some time ago and remember it resulted in a lot of conflicts/headaches. 😉 |
|
I asked an AI for some additional input on this, since this is a fairly complex topic involving both nullness semantics and compatibility across repositories. The following seems like a potentially workable way to make this incremental. The main difficulty here seems to be that Trying to make A possible way forward would be to make the migration more incremental:
It may also be worth deciding separately whether That behavioral change should probably be handled separately though, because the current tests explicitly document that null values are supported. This seems preferable to propagating |
Identified in review of #5638 (comment)
The
Configurationclass has incomplete null annotations, leading to wrong conclusions.This may have an impact on addons compilation, TBC