in lib/src/tag/tagger.dart [307:347]
void runtimeTags(List<String> tags, List<Explanation> explanations) {
try {
if (_isBinaryOnly) {
tags.addAll(<String>[Runtime.nativeAot.tag, Runtime.nativeJit.tag]);
} else {
final dartSdkViolationFinder = SdkViolationFinder(
_packageGraph, Sdk.dart, _pubspecCache, _session);
final sdkViolation =
dartSdkViolationFinder.findSdkViolation(packageName, _topLibraries);
if (sdkViolation != null) {
explanations.add(sdkViolation);
} else {
for (final runtime in Runtime.recognizedRuntimes) {
final finder = runtimeViolationFinder(
LibraryGraph(_session, runtime.declaredVariables),
runtime,
(List<Uri> path) => Explanation(
'Package not compatible with runtime ${runtime.name}',
'Because:\n${LibraryGraph.formatPath(path)}',
tag: runtime.tag));
var supports = true;
for (final lib in _topLibraries) {
final violationResult = finder.findViolation(lib);
if (violationResult != null) {
explanations.add(violationResult);
supports = false;
break;
}
}
if (supports) {
tags.add(runtime.tag);
}
}
}
}
} on TagException catch (e) {
explanations
.add(Explanation('Tag detection failed.', e.message, tag: null));
return;
}
}