This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new f5967159aa cleanup: Resolve some of dependencies on private headers 
(records) (#11280)
f5967159aa is described below

commit f5967159aa8f56e164e4d33548a938046c26b490
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Wed Apr 24 08:59:03 2024 -0600

    cleanup: Resolve some of dependencies on private headers (records) (#11280)
    
    * cleanup: Resolve some of dependencies on private headers
    
    * Include string_view
---
 include/records/RecordsConfig.h                          | 3 ++-
 src/api/InkAPI.cc                                        | 2 ++
 src/mgmt/rpc/handlers/common/RecordsUtils.cc             | 4 ++--
 {include => src}/mgmt/rpc/handlers/common/RecordsUtils.h | 2 --
 {include => src}/mgmt/rpc/handlers/common/convert.h      | 2 +-
 src/mgmt/rpc/handlers/config/Configuration.cc            | 2 +-
 src/mgmt/rpc/handlers/records/Records.cc                 | 2 +-
 src/records/RecordsConfigUtils.cc                        | 2 ++
 src/traffic_layout/info.cc                               | 2 ++
 src/traffic_server/traffic_server.cc                     | 1 +
 10 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/records/RecordsConfig.h b/include/records/RecordsConfig.h
index a51198847d..4a20757de3 100644
--- a/include/records/RecordsConfig.h
+++ b/include/records/RecordsConfig.h
@@ -23,7 +23,8 @@
 
 #pragma once
 
-#include "../../src/records/P_RecCore.h"
+#include <string_view>
+#include "RecDefs.h"
 
 // This is to manage the librecords table sizes. Not awesome, but better than 
the earlier recompiling of ATS requirement...
 extern int max_records_entries;
diff --git a/src/api/InkAPI.cc b/src/api/InkAPI.cc
index 6399fca384..6fbf0abb16 100644
--- a/src/api/InkAPI.cc
+++ b/src/api/InkAPI.cc
@@ -55,6 +55,8 @@
 #include "../iocore/hostdb/P_HostDB.h"
 #include "../iocore/cache/P_Cache.h"
 #include "records/RecCore.h"
+#include "../records/P_RecCore.h"
+#include "../records/P_RecDefs.h"
 #include "../iocore/net/P_SSLConfig.h"
 #include "../iocore/net/P_SSLClientUtils.h"
 #include "iocore/net/ConnectionTracker.h"
diff --git a/src/mgmt/rpc/handlers/common/RecordsUtils.cc 
b/src/mgmt/rpc/handlers/common/RecordsUtils.cc
index 0aaced049f..4a26a184e5 100644
--- a/src/mgmt/rpc/handlers/common/RecordsUtils.cc
+++ b/src/mgmt/rpc/handlers/common/RecordsUtils.cc
@@ -18,12 +18,12 @@
   limitations under the License.
 */
 
-#include "mgmt/rpc/handlers/common/RecordsUtils.h"
+#include "RecordsUtils.h"
 
 #include <system_error>
 #include <string>
 
-#include "mgmt/rpc/handlers/common/convert.h"
+#include "convert.h"
 #include "../../../../records/P_RecCore.h"
 #include "tscore/Tokenizer.h"
 
diff --git a/include/mgmt/rpc/handlers/common/RecordsUtils.h 
b/src/mgmt/rpc/handlers/common/RecordsUtils.h
similarity index 96%
rename from include/mgmt/rpc/handlers/common/RecordsUtils.h
rename to src/mgmt/rpc/handlers/common/RecordsUtils.h
index f5328301ac..b94e66dc07 100644
--- a/include/mgmt/rpc/handlers/common/RecordsUtils.h
+++ b/src/mgmt/rpc/handlers/common/RecordsUtils.h
@@ -24,11 +24,9 @@
 
 #include "tsutil/ts_errata.h"
 
-#include "mgmt/rpc/handlers/common/convert.h"
 #include "mgmt/rpc/handlers/common/ErrorUtils.h"
 
 #include "records/RecCore.h"
-#include "../../../../../src/records/P_RecCore.h"
 #include "tscore/Diags.h"
 
 #include <yaml-cpp/yaml.h>
diff --git a/include/mgmt/rpc/handlers/common/convert.h 
b/src/mgmt/rpc/handlers/common/convert.h
similarity index 99%
rename from include/mgmt/rpc/handlers/common/convert.h
rename to src/mgmt/rpc/handlers/common/convert.h
index 14e12d588a..4105d49585 100644
--- a/include/mgmt/rpc/handlers/common/convert.h
+++ b/src/mgmt/rpc/handlers/common/convert.h
@@ -29,7 +29,7 @@
 
 #include "shared/overridable_txn_vars.h"
 
-#include "mgmt/rpc/handlers/common/RecordsUtils.h"
+#include "RecordsUtils.h"
 
 ///
 /// @brief Namespace to group all the names used for key access to the yaml 
lookup nodes.
diff --git a/src/mgmt/rpc/handlers/config/Configuration.cc 
b/src/mgmt/rpc/handlers/config/Configuration.cc
index fb42ac52fc..f735813054 100644
--- a/src/mgmt/rpc/handlers/config/Configuration.cc
+++ b/src/mgmt/rpc/handlers/config/Configuration.cc
@@ -28,7 +28,7 @@
 
 #include "mgmt/config/FileManager.h"
 
-#include "mgmt/rpc/handlers/common/RecordsUtils.h"
+#include "../common/RecordsUtils.h"
 #include "tsutil/Metrics.h"
 
 namespace utils = rpc::handlers::records::utils;
diff --git a/src/mgmt/rpc/handlers/records/Records.cc 
b/src/mgmt/rpc/handlers/records/Records.cc
index de49f8aae5..7196c30df3 100644
--- a/src/mgmt/rpc/handlers/records/Records.cc
+++ b/src/mgmt/rpc/handlers/records/Records.cc
@@ -23,7 +23,7 @@
 #include <string>
 #include <string_view>
 
-#include "mgmt/rpc/handlers/common/RecordsUtils.h"
+#include "../common/RecordsUtils.h"
 // #include "common/yaml/codecs.h"
 ///
 /// @brief Local definitions to map requests and responsponses(not fully 
supported yet) to custom structures. All this definitions
diff --git a/src/records/RecordsConfigUtils.cc 
b/src/records/RecordsConfigUtils.cc
index d7bf4b456c..9b864915cb 100644
--- a/src/records/RecordsConfigUtils.cc
+++ b/src/records/RecordsConfigUtils.cc
@@ -22,7 +22,9 @@
  */
 
 #include "tscore/ink_config.h"
+#include "records/RecCore.h"
 #include "records/RecordsConfig.h"
+#include "P_RecUtils.h"
 
 //-------------------------------------------------------------------------
 // LibRecordsConfigInit
diff --git a/src/traffic_layout/info.cc b/src/traffic_layout/info.cc
index 54b9a532f8..57d7c1d460 100644
--- a/src/traffic_layout/info.cc
+++ b/src/traffic_layout/info.cc
@@ -23,6 +23,8 @@
 
 #include <fcntl.h>
 #include <openssl/crypto.h>
+#include <swoc/BufferWriter.h>
+#include <swoc/bwf_base.h>
 #include "tscore/Layout.h"
 #include "tscore/Filenames.h"
 #include "records/RecProcess.h"
diff --git a/src/traffic_server/traffic_server.cc 
b/src/traffic_server/traffic_server.cc
index 5d7dd9c579..2b40566a0a 100644
--- a/src/traffic_server/traffic_server.cc
+++ b/src/traffic_server/traffic_server.cc
@@ -78,6 +78,7 @@ extern "C" int plock(int);
 #include "../iocore/dns/P_SplitDNS.h"
 #include "../iocore/hostdb/P_HostDB.h"
 #include "../iocore/cache/P_Cache.h"
+#include "../records/P_RecCore.h"
 #include "tscore/Layout.h"
 #include "iocore/utils/Machine.h"
 #include "records/RecordsConfig.h"

Reply via email to