The modular kernel tree-shaker in package:front_end is breaking encapsulation: it contains hard-coded knowledge about methods that may be used by some transformations (like some helper methods for async/await).
Possible solutions to avoid this:
declare used members in transformers: this might be exposed as methods in kernel.Transformer and kernel.Target that, given a program/CoreTypes, they return a set of members that are expected to exist.
transformers inject an external declaration for members used: this might not be that easy to for modular transformers though.
The modular kernel tree-shaker in
package:front_end
is breaking encapsulation: it contains hard-coded knowledge about methods that may be used by some transformations (like some helper methods for async/await).Possible solutions to avoid this:
kernel.Transformer
andkernel.Target
that, given a program/CoreTypes, they return a set of members that are expected to exist./cc @kmillikin