Skip to content

Commit e78965a

Browse files
jnthntatumcopybara-github
authored andcommitted
Bump abseil and protobuf versions.
Use the `absl_nullable` style of nullability annotations. PiperOrigin-RevId: 788564038
1 parent 52ac271 commit e78965a

File tree

299 files changed

+4674
-4674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+4674
-4674
lines changed

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ bazel_dep(
3333
)
3434
bazel_dep(
3535
name = "protobuf",
36-
version = "28.3",
36+
version = "30.2",
3737
repo_name = "com_google_protobuf",
3838
)
3939
bazel_dep(
4040
name = "abseil-cpp",
41-
version = "20250127.1",
41+
version = "20250512.1",
4242
repo_name = "com_google_absl",
4343
)
4444
bazel_dep(

checker/internal/builtins_arena.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace cel::checker_internal {
2222

23-
google::protobuf::Arena* ABSL_NONNULL BuiltinsArena() {
23+
google::protobuf::Arena* absl_nonnull BuiltinsArena() {
2424
static absl::NoDestructor<google::protobuf::Arena> kArena;
2525
return &(*kArena);
2626
}

checker/internal/builtins_arena.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace cel::checker_internal {
2222

2323
// Shared arena for builtin types that are shared across all type checker
2424
// instances.
25-
google::protobuf::Arena* ABSL_NONNULL BuiltinsArena();
25+
google::protobuf::Arena* absl_nonnull BuiltinsArena();
2626

2727
} // namespace cel::checker_internal
2828

checker/internal/type_check_env.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
namespace cel::checker_internal {
3535

36-
const VariableDecl* ABSL_NULLABLE TypeCheckEnv::LookupVariable(
36+
const VariableDecl* absl_nullable TypeCheckEnv::LookupVariable(
3737
absl::string_view name) const {
3838
const TypeCheckEnv* scope = this;
3939
while (scope != nullptr) {
@@ -45,7 +45,7 @@ const VariableDecl* ABSL_NULLABLE TypeCheckEnv::LookupVariable(
4545
return nullptr;
4646
}
4747

48-
const FunctionDecl* ABSL_NULLABLE TypeCheckEnv::LookupFunction(
48+
const FunctionDecl* absl_nullable TypeCheckEnv::LookupFunction(
4949
absl::string_view name) const {
5050
const TypeCheckEnv* scope = this;
5151
while (scope != nullptr) {
@@ -61,12 +61,12 @@ absl::StatusOr<absl::optional<Type>> TypeCheckEnv::LookupTypeName(
6161
absl::string_view name) const {
6262
{
6363
// Check the descriptor pool first, then fallback to custom type providers.
64-
const google::protobuf::Descriptor* ABSL_NULLABLE descriptor =
64+
const google::protobuf::Descriptor* absl_nullable descriptor =
6565
descriptor_pool_->FindMessageTypeByName(name);
6666
if (descriptor != nullptr) {
6767
return Type::Message(descriptor);
6868
}
69-
const google::protobuf::EnumDescriptor* ABSL_NULLABLE enum_descriptor =
69+
const google::protobuf::EnumDescriptor* absl_nullable enum_descriptor =
7070
descriptor_pool_->FindEnumTypeByName(name);
7171
if (enum_descriptor != nullptr) {
7272
return Type::Enum(enum_descriptor);
@@ -90,10 +90,10 @@ absl::StatusOr<absl::optional<VariableDecl>> TypeCheckEnv::LookupEnumConstant(
9090
absl::string_view type, absl::string_view value) const {
9191
{
9292
// Check the descriptor pool first, then fallback to custom type providers.
93-
const google::protobuf::EnumDescriptor* ABSL_NULLABLE enum_descriptor =
93+
const google::protobuf::EnumDescriptor* absl_nullable enum_descriptor =
9494
descriptor_pool_->FindEnumTypeByName(type);
9595
if (enum_descriptor != nullptr) {
96-
const google::protobuf::EnumValueDescriptor* ABSL_NULLABLE enum_value_descriptor =
96+
const google::protobuf::EnumValueDescriptor* absl_nullable enum_value_descriptor =
9797
enum_descriptor->FindValueByName(value);
9898
if (enum_value_descriptor == nullptr) {
9999
return absl::nullopt;
@@ -131,7 +131,7 @@ absl::StatusOr<absl::optional<VariableDecl>> TypeCheckEnv::LookupEnumConstant(
131131
}
132132

133133
absl::StatusOr<absl::optional<VariableDecl>> TypeCheckEnv::LookupTypeConstant(
134-
google::protobuf::Arena* ABSL_NONNULL arena, absl::string_view name) const {
134+
google::protobuf::Arena* absl_nonnull arena, absl::string_view name) const {
135135
CEL_ASSIGN_OR_RETURN(absl::optional<Type> type, LookupTypeName(name));
136136
if (type.has_value()) {
137137
return MakeVariableDecl(std::string(type->name()), TypeType(arena, *type));
@@ -151,10 +151,10 @@ absl::StatusOr<absl::optional<StructTypeField>> TypeCheckEnv::LookupStructField(
151151
absl::string_view type_name, absl::string_view field_name) const {
152152
{
153153
// Check the descriptor pool first, then fallback to custom type providers.
154-
const google::protobuf::Descriptor* ABSL_NULLABLE descriptor =
154+
const google::protobuf::Descriptor* absl_nullable descriptor =
155155
descriptor_pool_->FindMessageTypeByName(type_name);
156156
if (descriptor != nullptr) {
157-
const google::protobuf::FieldDescriptor* ABSL_NULLABLE field_descriptor =
157+
const google::protobuf::FieldDescriptor* absl_nullable field_descriptor =
158158
descriptor->FindFieldByName(field_name);
159159
if (field_descriptor == nullptr) {
160160
field_descriptor = descriptor_pool_->FindExtensionByPrintableName(
@@ -185,7 +185,7 @@ absl::StatusOr<absl::optional<StructTypeField>> TypeCheckEnv::LookupStructField(
185185
return absl::nullopt;
186186
}
187187

188-
const VariableDecl* ABSL_NULLABLE VariableScope::LookupVariable(
188+
const VariableDecl* absl_nullable VariableScope::LookupVariable(
189189
absl::string_view name) const {
190190
const VariableScope* scope = this;
191191
while (scope != nullptr) {

checker/internal/type_check_env.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ class VariableScope {
6464
return absl::WrapUnique(new VariableScope(*env_, this));
6565
}
6666

67-
const VariableDecl* ABSL_NULLABLE LookupVariable(
67+
const VariableDecl* absl_nullable LookupVariable(
6868
absl::string_view name) const;
6969

7070
private:
7171
VariableScope(const TypeCheckEnv& env ABSL_ATTRIBUTE_LIFETIME_BOUND,
7272
const VariableScope* parent ABSL_ATTRIBUTE_LIFETIME_BOUND)
7373
: env_(&env), parent_(parent) {}
7474

75-
const TypeCheckEnv* ABSL_NONNULL env_;
76-
const VariableScope* ABSL_NULLABLE parent_;
75+
const TypeCheckEnv* absl_nonnull env_;
76+
const VariableScope* absl_nullable parent_;
7777
absl::flat_hash_map<std::string, VariableDecl> variables_;
7878
};
7979

@@ -85,18 +85,18 @@ class VariableScope {
8585
// This class is thread-compatible.
8686
class TypeCheckEnv {
8787
private:
88-
using VariableDeclPtr = const VariableDecl* ABSL_NONNULL;
89-
using FunctionDeclPtr = const FunctionDecl* ABSL_NONNULL;
88+
using VariableDeclPtr = const VariableDecl* absl_nonnull;
89+
using FunctionDeclPtr = const FunctionDecl* absl_nonnull;
9090

9191
public:
9292
explicit TypeCheckEnv(
93-
ABSL_NONNULL std::shared_ptr<const google::protobuf::DescriptorPool>
93+
absl_nonnull std::shared_ptr<const google::protobuf::DescriptorPool>
9494
descriptor_pool)
9595
: descriptor_pool_(std::move(descriptor_pool)),
9696
container_(""),
9797
parent_(nullptr) {}
9898

99-
TypeCheckEnv(ABSL_NONNULL std::shared_ptr<const google::protobuf::DescriptorPool>
99+
TypeCheckEnv(absl_nonnull std::shared_ptr<const google::protobuf::DescriptorPool>
100100
descriptor_pool,
101101
std::shared_ptr<google::protobuf::Arena> arena)
102102
: descriptor_pool_(std::move(descriptor_pool)),
@@ -166,16 +166,16 @@ class TypeCheckEnv {
166166
functions_[decl.name()] = std::move(decl);
167167
}
168168

169-
const TypeCheckEnv* ABSL_NULLABLE parent() const { return parent_; }
169+
const TypeCheckEnv* absl_nullable parent() const { return parent_; }
170170
void set_parent(TypeCheckEnv* parent) { parent_ = parent; }
171171

172172
// Returns the declaration for the given name if it is found in the current
173173
// or any parent scope.
174174
// Note: the returned declaration ptr is only valid as long as no changes are
175175
// made to the environment.
176-
const VariableDecl* ABSL_NULLABLE LookupVariable(
176+
const VariableDecl* absl_nullable LookupVariable(
177177
absl::string_view name) const;
178-
const FunctionDecl* ABSL_NULLABLE LookupFunction(
178+
const FunctionDecl* absl_nullable LookupFunction(
179179
absl::string_view name) const;
180180

181181
absl::StatusOr<absl::optional<Type>> LookupTypeName(
@@ -185,7 +185,7 @@ class TypeCheckEnv {
185185
absl::string_view type_name, absl::string_view field_name) const;
186186

187187
absl::StatusOr<absl::optional<VariableDecl>> LookupTypeConstant(
188-
google::protobuf::Arena* ABSL_NONNULL arena, absl::string_view type_name) const;
188+
google::protobuf::Arena* absl_nonnull arena, absl::string_view type_name) const;
189189

190190
TypeCheckEnv MakeExtendedEnvironment() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
191191
return TypeCheckEnv(this);
@@ -194,24 +194,24 @@ class TypeCheckEnv {
194194
return VariableScope(*this);
195195
}
196196

197-
const google::protobuf::DescriptorPool* ABSL_NONNULL descriptor_pool() const {
197+
const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool() const {
198198
return descriptor_pool_.get();
199199
}
200200

201201
private:
202-
explicit TypeCheckEnv(const TypeCheckEnv* ABSL_NONNULL parent)
202+
explicit TypeCheckEnv(const TypeCheckEnv* absl_nonnull parent)
203203
: descriptor_pool_(parent->descriptor_pool_),
204204
container_(parent != nullptr ? parent->container() : ""),
205205
parent_(parent) {}
206206

207207
absl::StatusOr<absl::optional<VariableDecl>> LookupEnumConstant(
208208
absl::string_view type, absl::string_view value) const;
209209

210-
ABSL_NONNULL std::shared_ptr<const google::protobuf::DescriptorPool> descriptor_pool_;
210+
absl_nonnull std::shared_ptr<const google::protobuf::DescriptorPool> descriptor_pool_;
211211
// If set, an arena was needed to allocate types in the environment.
212-
ABSL_NULLABLE std::shared_ptr<const google::protobuf::Arena> arena_;
212+
absl_nullable std::shared_ptr<const google::protobuf::Arena> arena_;
213213
std::string container_;
214-
const TypeCheckEnv* ABSL_NULLABLE parent_;
214+
const TypeCheckEnv* absl_nullable parent_;
215215

216216
// Maps fully qualified names to declarations.
217217
absl::flat_hash_map<std::string, VariableDecl> variables_;

checker/internal/type_checker_builder_impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ absl::Status CheckStdMacroOverlap(const FunctionDecl& decl) {
8383
}
8484

8585
absl::Status AddContextDeclarationVariables(
86-
const google::protobuf::Descriptor* ABSL_NONNULL descriptor, TypeCheckEnv& env) {
86+
const google::protobuf::Descriptor* absl_nonnull descriptor, TypeCheckEnv& env) {
8787
for (int i = 0; i < descriptor->field_count(); i++) {
8888
const google::protobuf::FieldDescriptor* proto_field = descriptor->field(i);
8989
MessageTypeField cel_field(proto_field);

checker/internal/type_checker_builder_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class TypeCheckerBuilderImpl;
4545
class TypeCheckerBuilderImpl : public TypeCheckerBuilder {
4646
public:
4747
TypeCheckerBuilderImpl(
48-
ABSL_NONNULL std::shared_ptr<const google::protobuf::DescriptorPool>
48+
absl_nonnull std::shared_ptr<const google::protobuf::DescriptorPool>
4949
descriptor_pool,
5050
const CheckerOptions& options)
5151
: options_(options),
@@ -78,14 +78,14 @@ class TypeCheckerBuilderImpl : public TypeCheckerBuilder {
7878

7979
const CheckerOptions& options() const override { return options_; }
8080

81-
google::protobuf::Arena* ABSL_NONNULL arena() override {
81+
google::protobuf::Arena* absl_nonnull arena() override {
8282
if (arena_ == nullptr) {
8383
arena_ = std::make_shared<google::protobuf::Arena>();
8484
}
8585
return arena_.get();
8686
}
8787

88-
const google::protobuf::DescriptorPool* ABSL_NONNULL descriptor_pool() const override {
88+
const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool() const override {
8989
return descriptor_pool_.get();
9090
}
9191

@@ -120,7 +120,7 @@ class TypeCheckerBuilderImpl : public TypeCheckerBuilder {
120120
};
121121

122122
absl::Status BuildLibraryConfig(const CheckerLibrary& library,
123-
ConfigRecord* ABSL_NONNULL config);
123+
ConfigRecord* absl_nonnull config);
124124

125125
absl::Status ApplyConfig(ConfigRecord config, const TypeCheckerSubset* subset,
126126
TypeCheckEnv& env);
@@ -131,7 +131,7 @@ class TypeCheckerBuilderImpl : public TypeCheckerBuilder {
131131
ConfigRecord default_config_;
132132
// Active target for configuration changes.
133133
// This is used to track which library the change is made on behalf of.
134-
ConfigRecord* ABSL_NONNULL target_config_;
134+
ConfigRecord* absl_nonnull target_config_;
135135
std::shared_ptr<const google::protobuf::DescriptorPool> descriptor_pool_;
136136
std::shared_ptr<google::protobuf::Arena> arena_;
137137
std::vector<CheckerLibrary> libraries_;

checker/internal/type_checker_impl.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class ResolveVisitor : public AstVisitorBase {
251251
const TypeCheckEnv& env, const AstImpl& ast,
252252
TypeInferenceContext& inference_context,
253253
std::vector<TypeCheckIssue>& issues,
254-
google::protobuf::Arena* ABSL_NONNULL arena)
254+
google::protobuf::Arena* absl_nonnull arena)
255255
: container_(container),
256256
namespace_generator_(std::move(namespace_generator)),
257257
env_(&env),
@@ -358,7 +358,7 @@ class ResolveVisitor : public AstVisitorBase {
358358

359359
// Resolves the function call shape (i.e. the number of arguments and call
360360
// style) for the given function call.
361-
const VariableDecl* ABSL_NULLABLE LookupIdentifier(absl::string_view name);
361+
const VariableDecl* absl_nullable LookupIdentifier(absl::string_view name);
362362

363363
// Resolves the applicable function overloads for the given function call.
364364
//
@@ -465,12 +465,12 @@ class ResolveVisitor : public AstVisitorBase {
465465

466466
absl::string_view container_;
467467
NamespaceGenerator namespace_generator_;
468-
const TypeCheckEnv* ABSL_NONNULL env_;
469-
TypeInferenceContext* ABSL_NONNULL inference_context_;
470-
std::vector<TypeCheckIssue>* ABSL_NONNULL issues_;
471-
const ast_internal::AstImpl* ABSL_NONNULL ast_;
468+
const TypeCheckEnv* absl_nonnull env_;
469+
TypeInferenceContext* absl_nonnull inference_context_;
470+
std::vector<TypeCheckIssue>* absl_nonnull issues_;
471+
const ast_internal::AstImpl* absl_nonnull ast_;
472472
VariableScope root_scope_;
473-
google::protobuf::Arena* ABSL_NONNULL arena_;
473+
google::protobuf::Arena* absl_nonnull arena_;
474474

475475
// state tracking for the traversal.
476476
const VariableScope* current_scope_;
@@ -979,7 +979,7 @@ void ResolveVisitor::ResolveFunctionOverloads(const Expr& expr,
979979
types_[&expr] = resolution->result_type;
980980
}
981981

982-
const VariableDecl* ABSL_NULLABLE ResolveVisitor::LookupIdentifier(
982+
const VariableDecl* absl_nullable ResolveVisitor::LookupIdentifier(
983983
absl::string_view name) {
984984
if (const VariableDecl* decl = current_scope_->LookupVariable(name);
985985
decl != nullptr) {
@@ -1033,7 +1033,7 @@ void ResolveVisitor::ResolveQualifiedIdentifier(
10331033
return;
10341034
}
10351035

1036-
const VariableDecl* ABSL_NULLABLE decl = nullptr;
1036+
const VariableDecl* absl_nullable decl = nullptr;
10371037
int segment_index_out = -1;
10381038
namespace_generator_.GenerateCandidates(
10391039
qualifiers, [&decl, &segment_index_out, this](absl::string_view candidate,

checker/internal/type_checker_impl_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void AbslStringify(Sink& sink, const TypeCheckIssue& issue) {
102102
namespace checker_internal {
103103
namespace {
104104

105-
google::protobuf::Arena* ABSL_NONNULL TestTypeArena() {
105+
google::protobuf::Arena* absl_nonnull TestTypeArena() {
106106
static absl::NoDestructor<google::protobuf::Arena> kArena;
107107
return &(*kArena);
108108
}
@@ -161,7 +161,7 @@ MATCHER_P2(IsFunctionReference, fn_name, overloads, "") {
161161
return reference.name() == fn_name && got_overload_set == want_overload_set;
162162
}
163163

164-
absl::Status RegisterMinimalBuiltins(google::protobuf::Arena* ABSL_NONNULL arena,
164+
absl::Status RegisterMinimalBuiltins(google::protobuf::Arena* absl_nonnull arena,
165165
TypeCheckEnv& env) {
166166
Type list_of_a = ListType(arena, TypeParamType("A"));
167167

checker/type_checker_builder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ class TypeCheckerBuilder {
146146
// that will be used by the TypeChecker being built.
147147
//
148148
// On Build(), the arena is transferred to the TypeChecker being built.
149-
virtual google::protobuf::Arena* ABSL_NONNULL arena() = 0;
149+
virtual google::protobuf::Arena* absl_nonnull arena() = 0;
150150

151151
// The configured descriptor pool.
152-
virtual const google::protobuf::DescriptorPool* ABSL_NONNULL descriptor_pool()
152+
virtual const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool()
153153
const = 0;
154154
};
155155

0 commit comments

Comments
 (0)