App is a terrible idea with a good intention behind it.
It should not be used, it has problems like this, it can lead to initialization order bugs, it doesn’t play well with some other libraries like Spark, etc.
@main and top-level definitions are also terrible ideas with good intentions behind them.
I tried to use them a couple of times and I always found some problem, they should be fixed now but they already lost my trust.
Really just write a regular main method, is not the end of the world.
def main(args: Array[String]): Unit =
// Your code here.
PS: An advice, convert the
args to a