dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.21k stars 1.57k forks source link

Can various test packages be excluded from package config generator? #54678

Open parlough opened 9 months ago

parlough commented 9 months ago

Currently tools/generate_package_config.dart results in a lot of test and some examples packages from "third party" repositories being added to the .dart_tool/package_config.json.

For example, it happens for package:webdev which doesn't have a pubspec in the root directory, so a lot of first level test packages and even more in /fixtures end up included.

I'm not sure if these and various other packages are needed in testing or something, but if not, it would be nice to not add these to the package config. They end up increasing the analysis context size unnecessarily, increasing the likelihood of suggesting irrelevant results and increasing memory usage while developing various parts of the SDK.

sortie commented 8 months ago

We could potentially denylist some stuff.

But I'm not sure if it's really possible and worth it. You see, there's a lot of unexpected uses of these packages in many different places that are difficult to enumerate, including testing, benchmarking, local development, and what not, and I don't think any single individual have all the knowledge to do this.