Stop enforcing "enableExterns" feature.
@@ -23,7 +23,6 @@ import com.google.template.soy.base.internal.IdGenerator;
import com.google.template.soy.error.ErrorReporter;
import com.google.template.soy.error.SoyErrorKind;
import com.google.template.soy.exprtree.OperatorNodes.AssertNonNullOpNode;
-import com.google.template.soy.soytree.ExternNode;
import com.google.template.soy.soytree.SoyFileNode;
import com.google.template.soy.soytree.SoyTreeUtils;
@@ -41,9 +40,6 @@ final class EnforceExperimentalFeaturesPass implements CompilerFilePass {
SoyErrorKind.of(
"Non-null assertion operator not supported, use the ''checkNotNull'' function instead.");
- private static final SoyErrorKind EXTERN_NODES_BANNED =
- SoyErrorKind.of("Extern nodes are not allowed.");
-
private final ImmutableSet<String> features;
private final ErrorReporter reporter;
@@ -63,11 +59,5 @@ final class EnforceExperimentalFeaturesPass implements CompilerFilePass {
reporter.report(
assertNonNullOpNode.getSourceLocation(), NON_NULL_ASSERTION_BANNED));
}
-
- if (!features.contains("enableExterns")) {
- SoyTreeUtils.allNodesOfType(file, ExternNode.class)
- .forEach(
- externNode -> reporter.report(externNode.getSourceLocation(), EXTERN_NODES_BANNED));
- }
}
}
