Reposted from #13598.
I want to open a debate about removing the compiler warning about missing license information, and in fact removing source code licensing concerns from the compiler entirely.
I believe this warning should never have been added in the first place. The motivation given in #7738 was that a license header would allow tools to auto-publish source code, presumably by automatically uploading it somewhere at the moment the contract is deployed. Has any Solidity developer ever requested this? There is no mention of such requests in #7738. It reads like the plan is to do this without user consent. I believe the question of user consent is much larger than one of licensing requirements. I may have the intention of licensing my code as MIT, I might even have made up my mind about this when I created the Solidity file and stated the intent in a license header, and yet it would be consistent with that to want to develop the code in private. Specifically, I could want to keep the source code private even while deploying the bytecode to testnet or mainnet. One might argue that the bytecode will be public by then, so you might as well make the source code public, but this ignores (among other things) the existence of comments in the code, which are definitely not present in the bytecode.
My intuition is that the idea to automatically publish source code was motivated by the difficulty that many developers face when trying to verify their source code. But removing agency from the developer should not be the solution. The tools for automatic verification are already there, as proven by things like hardhat-etherscan. If there are any quirks in the compiler that make verification difficult, the effort should be placed on fixing those quirks so that tool developers can do their job and provide a range of solutions to users.
The project of auto-publication of source code should not be pursued unless the user is asked for consent. If there is a request for user consent, at that moment the licensing requirements can be confirmed with the user.
As it stands, the warning is simply adding one more annoyance and concern to the developer, who is now forced to understand, for example, if there are any legal implications of putting in a license header or what UNLICENSED really means. This comes at a cost, and as far as I can tell provides zero value, considering that the value it was intended to provide should probably never materialize for the reasons I explained above.