pub
pub copied to clipboard
Consider running `downgrade`d analysis when publishing
https://github.com/dart-lang/pub/pull/3568 added ananlysis on publish, but there's a very easy mistake to make that it doesn't currently catch, which is to use something from a newer version of a dependency than 'pubspec' requires. Even packages that use CI on all changes will generally not catch this, because CI is usually a clean environment, so will always get the latest possible resolutions.
In flutter/packages and flutter/plugins we now use custom CI tools that do a normal analyze pass, but then a second pass after running {dart/flutter} pub downgrade. It would be nice if pub itself did that, so that the problem could be minimized across the entire ecosystem.