I would like to propose to add another tool in the compiler. Something that will check some rules in the code base that aim for helping the developer for future versions (of the language, std lib or shards)
The first thing would be to check if an obsolete method is called. This will not only help users of the std lib but also simplifying the work on shards to advertise future breaking changes. Authors will find value on implementing some deprecation policy.
Another use is that some breaking changes in the language itself are hard to detect at first eyesight.
Having this tool detect beforehand it will also allow us to see a list of issues rather than stop at the first compilation error once we are migrating.
I’m ok with breaking changes but I would prefer to have a migration path as smooth as possible.
Specific cases were I would found this valuable:
Reference relevant information regarding a change like in #6598
Avoid having to manually use macros to simulate a warning that would be annoying in every compilation. Like it is proposed here.
When primitives changes like
a / bwill change from Int to Float. That could be a silent change, but we already have
//to start changing the code, but we are not amused by the work of checking when two integers are been divided in the current code base.
Implementing these checks is basically the same effort as building the code but not generating the output. It could be viewed as adding warning support in the compiler but with an opt-in flag or tool that will show them.
One alternative would be to contribute with ameba but currently, AFAIK it runs at the syntax level and all the examples above require almost a compilation of the process which means that ameba would need to build the compiler to run those rules.