noteOtherWebRuntimeVersion function

void noteOtherWebRuntimeVersion()

Says once, with print, when the page fetched another @litert-lm/core than liteRtLmWebRuntimeVersion: one that has every member this release calls still runs, but its behaviour is not the one measured (0.18.0 refuses the GPU export, "Unsupported backend: 2").

Implementation

void noteOtherWebRuntimeVersion() {
  if (_versionNoted) return;
  final others = liteRtLmWebFetchedVersions()
    ..remove(liteRtLmWebRuntimeVersion);
  if (others.isEmpty) return;
  _versionNoted = true;
  // ignore: avoid_print
  print(
    '[litertlm_dart] WARNING: the page loaded @litert-lm/core '
    '${others.join(', ')}; this release is measured on '
    '$liteRtLmWebRuntimeVersion ($liteRtLmWebModuleUrl). Shown once per page.',
  );
}