Skip to content

Commit 837a2cd

Browse files
anandoleecopybara-github
authored andcommitted
Breaking Change: Remove AddUnusedImportTrackFile() and ClearUnusedImportTrackFiles(). Remove PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT
https://protobuf.dev/news/2025-09-19/#cpp-remove-macros PiperOrigin-RevId: 842951980
1 parent 07819be commit 837a2cd

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

src/google/protobuf/compiler/importer.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,6 @@ class PROTOBUF_EXPORT Importer {
186186
bool unused_import_is_error = false);
187187
void ClearDirectInputFiles();
188188

189-
#if !defined(PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT) && !defined(SWIG)
190-
ABSL_DEPRECATED("Use AddDirectInputFile")
191-
void AddUnusedImportTrackFile(absl::string_view file_name,
192-
bool is_error = false) {
193-
AddDirectInputFile(file_name, is_error);
194-
}
195-
ABSL_DEPRECATED("Use AddDirectInputFile")
196-
void ClearUnusedImportTrackFiles() { ClearDirectInputFiles(); }
197-
#endif // !PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT && !SWIG
198-
199189

200190
private:
201191
SourceTreeDescriptorDatabase database_;

src/google/protobuf/descriptor.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2514,17 +2514,6 @@ class PROTOBUF_EXPORT DescriptorPool {
25142514
bool unused_import_is_error = false);
25152515
void ClearDirectInputFiles();
25162516

2517-
#if !defined(PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT) && !defined(SWIG)
2518-
ABSL_DEPRECATED("Use AddDirectInputFile")
2519-
void AddUnusedImportTrackFile(absl::string_view file_name,
2520-
bool is_error = false) {
2521-
AddDirectInputFile(file_name, is_error);
2522-
}
2523-
ABSL_DEPRECATED("Use AddDirectInputFile")
2524-
void ClearUnusedImportTrackFiles() { ClearDirectInputFiles(); }
2525-
#endif // !PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT && !SWIG
2526-
2527-
25282517
private:
25292518
friend class Descriptor;
25302519
friend class internal::LazyDescriptor;

src/google/protobuf/port_def.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
144144
// Owner: shaod@, gberg@
145145
#define PROTOBUF_FUTURE_DESCRIPTOR_EXTENSION_DECL 1
146146

147-
// Renames DescriptorPool::AddUnusedImportTrackFile
148-
// Owner: mkruskal@
149-
#define PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT 1
150-
151147
// Marks several logically constant operations on Repeated*Field as nodiscard.
152148
// Owner: ckennelly@, mkruskal@
153149
#define PROTOBUF_FUTURE_ADD_NODISCARD [[nodiscard]]

0 commit comments

Comments
 (0)