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.11k stars 1.57k forks source link

Create regression test for benchmarks with conflicting library names #43907

Open nshahan opened 3 years ago

nshahan commented 3 years ago

When benchmarks are run in DDC our infra combines all libraries into a single module. This means we can run without depending on a build system but introduces some errors that we don't see in other environments.

One of these errors is conflicting library names from multiple packages. Most of the module system can't handle this. The "ddc" module system does so we changed the benchmark infra to use that module system. As an example package:collection and package:crypto both have a library named :src/utils. These conflict if a benchmark imports both packages.

We could add a regression test for this if we changed the general test suite to use the "ddc" module system.

@sortie Another possible way to add a regression test without having to migrate the entire test infra to a different module system would be with the try_benchmarks.sh script that gets run on benchmarks-linux-try bot. We could update the hello.dart or add another test that ensures we can build and run a benchmark that imports multiple packages with conflicting libraries. What do you think?

Markzipan commented 3 years ago

Potentially related to this: https://github.com/dart-lang/sdk/issues/37534