You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mraleph opened this issue
Jun 23, 2023
· 4 comments
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P3A lower priority bug or feature requesttriagedIssue has been triaged by sub team
Protobuf aware tree-shakingb binary ('pkg/vm/bin/protobuf_aware_treeshaker.dart') does the following:
final printer =BinaryPrinter(sink, libraryFilter: (lib) {
if (removeCoreLibs &&isCoreLibrary(lib)) returnfalse;
if (isLibEmpty(lib)) returnfalse;
returntrue;
}, includeSources:!removeSource);
// ...boolisLibEmpty(Library lib) {
return lib.classes.isEmpty &&
lib.procedures.isEmpty &&
lib.fields.isEmpty &&
lib.typedefs.isEmpty;
}
However even if the library is empty that does not mean it can be safely dropped because there might be constants which refer to it, most specifically private symbols, so if you pass the following code through protobuf aware treeshaking
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P3A lower priority bug or feature requesttriagedIssue has been triaged by sub team
Protobuf aware tree-shakingb binary ('pkg/vm/bin/protobuf_aware_treeshaker.dart') does the following:
However even if the library is empty that does not mean it can be safely dropped because there might be constants which refer to it, most specifically private symbols, so if you pass the following code through protobuf aware treeshaking
You get incorrect kernel out which contains a dangling reference to
lib.dart
library.The text was updated successfully, but these errors were encountered: