Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions checker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ java_library(
exports = ["//checker/src/main/java/dev/cel/checker:type_provider_legacy"],
)

java_library(
name = "type_provider_legacy_impl",
visibility = ["//:internal"],
exports = ["//checker/src/main/java/dev/cel/checker:type_provider_legacy_impl"],
)

java_library(
name = "checker_legacy_environment",
deprecation = "See go/cel-java-migration-guide. Please use CEL-Java Fluent APIs //compiler instead",
Expand Down
18 changes: 0 additions & 18 deletions checker/src/main/java/dev/cel/checker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,6 @@ java_library(
],
)

java_library(
name = "type_provider_legacy_impl",
srcs = ["TypeProviderLegacyImpl.java"],
tags = [
],
deps = [
":type_provider_legacy",
"//common/annotations",
"//common/types",
"//common/types:cel_proto_types",
"//common/types:type_providers",
"@cel_spec//proto/cel/expr:checked_java_proto",
"@maven//:com_google_errorprone_error_prone_annotations",
"@maven//:com_google_guava_guava",
"@maven//:org_jspecify_jspecify",
],
)

java_library(
name = "checker_legacy_environment",
srcs = CHECKER_LEGACY_ENV_SOURCES,
Expand Down
24 changes: 0 additions & 24 deletions checker/src/main/java/dev/cel/checker/CelStandardDeclarations.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
package dev.cel.checker;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static java.util.Arrays.stream;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.Immutable;
Expand All @@ -34,7 +32,6 @@
import dev.cel.common.types.SimpleType;
import dev.cel.common.types.TypeParamType;
import dev.cel.common.types.TypeType;
import java.util.Optional;

/**
* Standard declarations for CEL.
Expand Down Expand Up @@ -606,13 +603,6 @@ public enum Size implements StandardOverload {
CelOverloadDecl.newMemberOverload("map_size", "map size", SimpleType.INT, MAP_OF_AB)),
;

private static final ImmutableMap<String, Size> ID_TO_ENUM =
stream(values()).collect(toImmutableMap(e -> e.celOverloadDecl().overloadId(), e -> e));

public static Optional<Size> fromOverloadId(String overloadId) {
return Optional.ofNullable(ID_TO_ENUM.get(overloadId));
}

private final CelOverloadDecl celOverloadDecl;

Size(CelOverloadDecl overloadDecl) {
Expand Down Expand Up @@ -1489,16 +1479,6 @@ public boolean isHeterogeneousComparison() {
public CelOverloadDecl celOverloadDecl() {
return this.celOverloadDecl;
}

/** Finds a Comparison by its overload ID. */
public static Optional<Comparison> fromOverloadId(String overloadId) {
for (Comparison c : values()) {
if (c.celOverloadDecl().overloadId().equals(overloadId)) {
return Optional.of(c);
}
}
return Optional.empty();
}
}

private Overload() {}
Expand All @@ -1518,10 +1498,6 @@ public String functionName() {
return functionName;
}

boolean isDeprecated() {
return isDeprecated;
}

StandardFunction(Operator operator, StandardOverload... overloads) {
this(false, operator.getFunction(), overloads);
}
Expand Down
121 changes: 0 additions & 121 deletions checker/src/main/java/dev/cel/checker/TypeProviderLegacyImpl.java

This file was deleted.

1 change: 0 additions & 1 deletion checker/src/test/java/dev/cel/checker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ java_library(
"//checker:proto_type_mask",
"//checker:standard_decl",
"//checker:type_inferencer",
"//checker:type_provider_legacy_impl",
"//common:cel_ast",
"//common:cel_function_decl",
"//common:cel_issue",
Expand Down
133 changes: 0 additions & 133 deletions checker/src/test/java/dev/cel/checker/TypeProviderLegacyImplTest.java

This file was deleted.

14 changes: 0 additions & 14 deletions common/src/main/java/dev/cel/common/CelAbstractSyntaxTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
package dev.cel.common;

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.errorprone.annotations.Immutable;
import dev.cel.common.annotations.Internal;
import dev.cel.common.ast.CelConstant;
import dev.cel.common.ast.CelExpr;
import dev.cel.common.ast.CelReference;
import dev.cel.common.types.CelType;
Expand Down Expand Up @@ -124,16 +122,4 @@ public CelReference getReferenceOrThrow(long exprId) {
return getReference(exprId)
.orElseThrow(() -> new NoSuchElementException("Expr Id not found: " + exprId));
}

Optional<CelConstant> findEnumValue(long exprId) {
CelReference ref = references().get(exprId);
return ref != null ? ref.value() : Optional.empty();
}

Optional<ImmutableList<String>> findOverloadIDs(long exprId) {
CelReference ref = references().get(exprId);
return ref != null && !ref.value().isPresent()
? Optional.of(ref.overloadIds())
: Optional.empty();
}
}
Loading
Loading