Compression CAN certainly weaken springs.
Does it always? NO.
If the spring is never compressed too far, and is made properly with good quality materials, then leaving it compressed won't weaken it.
But if any of that changes then leaving it compressed can certainly weaken it.
This has been common knowledge in the spring-piston airgun community. The springs in those guns are often compressed until they are coilbound in an attempt to get maximum power from minimum weight and space. Leaving them cocked can easily be demonstrated to cause the spring to weaken.
Semi-auto pistol magazines are another situation where the manufacturer may be willing to sacrifice some spring life to get another couple of rounds to fit into the magazine--especially since magazine springs are often considered to be normal wear items that can be easily replaced. If you poke around a bit, you can find people telling about magazines that were left fully loaded for long periods and then failed to function properly. Either because the manufacturer set up the design so the spring was over-compressed with the mag fully loaded or because the materials weren't the best quality. You can also find many, MANY situations where it didn't as well--if the design doesn't over-compress the springs and the materials are good quality then it's not an issue.
I've personally done tests on magazines, leaving them fully loaded for up to years and in EVERY case, there was measurable weakening of the springs from leaving them loaded. In the mags I tested, that weakening was never enough to cause a failure to function, but the springs did weaken and they did weaken more the longer they were left fully loaded.
The bottom line is that both of these two statements are false:
1. Springs never weaken from being left compressed.
2. Springs always weaken from being left compressed.
In both cases, much more needs to be said before the statements can be accurate. There certainly are situations where they do weaken from being left compressed, and anyone who wants to do more testing than talking can verify that is true. But is also true that leaving them compressed may not have any effect if the design they are used in doesn't overcompress them and the materials/manufacturing are good.
Let's do this all again in a couple of weeks.
As far as this thread's specific topic goes, firearm mainsprings tend to not be over-compressed and since they are not considered a normal wear item, they are generally well-made from high-quality materials. I would not expect a firearm mainspring to weaken from the gun being left cocked. Offhand I can't recall of ever hearing or reading of such a case.