ResourceProviderMixin of the analyzer_testing package has a method newSinglePackageConfigJsonFile which is used to generate a package config specifying one package as a dependency. Currently it generates a config for a package that lists itself as a dependency.
Parameterizing the destination can allow the package being depended on and the package the config is being made for to be distinct. This is useful in setting up a mock package that a package being tested needs as a dependency.
Not sure if it is a problem in the SDK per se - but the method and its documentation was a bit confusing since it seems like a generic method for creating a package config but only does so in the way described at the start of this post. I propose introducing the destination parameter so it can be used to create an arbitrary single-package config file.
Changes: https://dart-review.googlesource.com/c/sdk/+/450840