Files
sdk/pkg/dev_compiler/lib/src
Jonas Finnemann Jensen bc8929e7c6 Skip Version: ${Platform.version} comment when dart:io is unavailable
In an ideal world, we'd have access to the version of the current Dart SDK,
but other means when compiling for web. But at the moment we don't.

It should probably just be in the _compilation environment_ as suggested in
https://dartbug.com/54785

But until such time, I suggest we just opt to not include the version comment,
when `dart:io` is unavailable.

We could also go through all of dev_compiler and wrap all references to `Platform`
from `dart:io`. But I need this to make a clientside dartpad work. And I think
this is sufficient (if not I'll come back asking for more).

In an ideal world, we would also add tests to ensure that `Platform` isn't used.
But in the future, I plan to build and test the dartpad compilation environment
inside the sdk repository, thus, new usage of `Platform` will then break those tests.

Change-Id: I952c1794c43169c12f3e8099ad0773e5e59c6206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481560
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2026-02-19 11:16:40 -08:00
..