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

bneradt 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 087b61440b Break inkdns->inkcache and inkhostdb->inkcache cycles 
(#10597)
087b61440b is described below

commit 087b61440ba79e236ebb23027da1e626443a369f
Author: JosiahWI <[email protected]>
AuthorDate: Fri Oct 13 13:54:13 2023 -0500

    Break inkdns->inkcache and inkhostdb->inkcache cycles (#10597)
    
    This removes unused inkcache includes from the inkdns and inkhostdb
    components, breaking the dependency on inkcache for both.
---
 include/ts/InkAPIPrivateIOCore.h                  | 2 --
 iocore/cache/CMakeLists.txt                       | 1 +
 {proxy/http => iocore/cache}/HttpTransactCache.cc | 3 +++
 {proxy/http => iocore/cache}/HttpTransactCache.h  | 0
 iocore/cache/Makefile.am                          | 2 ++
 iocore/dns/CMakeLists.txt                         | 1 -
 iocore/dns/P_DNS.h                                | 1 -
 iocore/hostdb/CMakeLists.txt                      | 1 -
 iocore/hostdb/I_HostDB.h                          | 1 -
 iocore/net/SSLNetVConnection.cc                   | 1 +
 proxy/http/CMakeLists.txt                         | 1 -
 proxy/http/HttpTunnel.cc                          | 4 ++++
 proxy/http/Makefile.am                            | 2 --
 13 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/ts/InkAPIPrivateIOCore.h b/include/ts/InkAPIPrivateIOCore.h
index e3833b8a8b..9894cce038 100644
--- a/include/ts/InkAPIPrivateIOCore.h
+++ b/include/ts/InkAPIPrivateIOCore.h
@@ -24,11 +24,9 @@
 #pragma once
 #if !defined(__GNUC__)
 #include "I_EventSystem.h"
-#include "I_Cache.h"
 #include "I_Net.h"
 #else
 #include "P_EventSystem.h"
-#include "P_Cache.h"
 #include "P_Net.h"
 #endif
 
diff --git a/iocore/cache/CMakeLists.txt b/iocore/cache/CMakeLists.txt
index d9c12a9d91..83e6a4fadc 100644
--- a/iocore/cache/CMakeLists.txt
+++ b/iocore/cache/CMakeLists.txt
@@ -28,6 +28,7 @@ add_library(inkcache STATIC
     CacheVC.cc
     CacheVol.cc
     CacheWrite.cc
+    HttpTransactCache.cc
     RamCacheCLFUS.cc
     RamCacheLRU.cc
     Store.cc
diff --git a/proxy/http/HttpTransactCache.cc b/iocore/cache/HttpTransactCache.cc
similarity index 99%
rename from proxy/http/HttpTransactCache.cc
rename to iocore/cache/HttpTransactCache.cc
index c1dff8b275..4ceb7490f4 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/iocore/cache/HttpTransactCache.cc
@@ -21,6 +21,8 @@
   limitations under the License.
  */
 
+#include "P_CacheHttp.h"
+
 #include "tscore/ink_platform.h"
 
 #include "HttpTransact.h"
@@ -29,6 +31,7 @@
 #include <ctime>
 #include "HTTP.h"
 #include "HttpCompat.h"
+
 #include "tscore/InkErrno.h"
 
 /**
diff --git a/proxy/http/HttpTransactCache.h b/iocore/cache/HttpTransactCache.h
similarity index 100%
rename from proxy/http/HttpTransactCache.h
rename to iocore/cache/HttpTransactCache.h
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index e62303bc3e..011307c67f 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -42,6 +42,8 @@ libinkcache_a_SOURCES = \
        CacheVC.cc \
        CacheVol.cc \
        CacheWrite.cc \
+       HttpTransactCache.cc \
+       HttpTransactcache.h \
        I_Cache.h \
        I_CacheDefs.h \
        I_Store.h \
diff --git a/iocore/dns/CMakeLists.txt b/iocore/dns/CMakeLists.txt
index b509fbb088..e5df997772 100644
--- a/iocore/dns/CMakeLists.txt
+++ b/iocore/dns/CMakeLists.txt
@@ -35,7 +35,6 @@ target_include_directories(inkdns PRIVATE
 
 target_link_libraries(inkdns
     PUBLIC
-        ts::inkcache
         ts::inkevent
         ts::inkhostdb
         ts::proxy
diff --git a/iocore/dns/P_DNS.h b/iocore/dns/P_DNS.h
index 8420a0a8eb..a32c04482c 100644
--- a/iocore/dns/P_DNS.h
+++ b/iocore/dns/P_DNS.h
@@ -32,7 +32,6 @@
 #include "tscore/ink_platform.h"
 #include "I_DNS.h"
 #include "P_EventSystem.h"
-#include "I_Cache.h"
 #include "P_Net.h"
 #include "P_DNSConnection.h"
 #include "P_DNSProcessor.h"
diff --git a/iocore/hostdb/CMakeLists.txt b/iocore/hostdb/CMakeLists.txt
index 678ebfc852..db9ea717bd 100644
--- a/iocore/hostdb/CMakeLists.txt
+++ b/iocore/hostdb/CMakeLists.txt
@@ -38,7 +38,6 @@ target_include_directories(inkhostdb
 
 target_link_libraries(inkhostdb
     PUBLIC
-        ts::inkcache
         ts::inkdns
         ts::inkevent
         ts::tscore
diff --git a/iocore/hostdb/I_HostDB.h b/iocore/hostdb/I_HostDB.h
index d9aecd8d8c..08538917df 100644
--- a/iocore/hostdb/I_HostDB.h
+++ b/iocore/hostdb/I_HostDB.h
@@ -32,7 +32,6 @@
 
 #include "I_EventSystem.h"
 #include "I_Net.h"
-#include "I_Cache.h"
 
 #include "I_HostDBProcessor.h"
 
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 717d0021a0..ac68ecf4a0 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -24,6 +24,7 @@
 #include "tscore/ink_config.h"
 #include "tscore/EventNotify.h"
 #include "tscore/I_Layout.h"
+#include "tscore/InkErrno.h"
 #include "tscore/TSSystemState.h"
 
 #include "api/InkAPIInternal.h" // Added to include the ssl_hook definitions
diff --git a/proxy/http/CMakeLists.txt b/proxy/http/CMakeLists.txt
index 2619865120..b69a8c4728 100644
--- a/proxy/http/CMakeLists.txt
+++ b/proxy/http/CMakeLists.txt
@@ -32,7 +32,6 @@ add_library(http STATIC
         Http1ServerSession.cc
         HttpSessionManager.cc
         HttpTransact.cc
-        HttpTransactCache.cc
         HttpTransactHeaders.cc
         HttpTunnel.cc
         HttpVCTable.cc
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 671bbbefa0..748d79aec2 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -35,6 +35,10 @@
 #include "HttpTunnel.h"
 #include "HttpSM.h"
 #include "HttpDebugNames.h"
+
+// inkcache
+#include "P_Cache.h"
+
 #include "tscore/ParseRules.h"
 #include "tscore/ink_memory.h"
 
diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am
index ef06e03df0..b9d3255870 100644
--- a/proxy/http/Makefile.am
+++ b/proxy/http/Makefile.am
@@ -72,8 +72,6 @@ libhttp_a_SOURCES = \
        HttpSessionManager.h \
        HttpTransact.cc \
        HttpTransact.h \
-       HttpTransactCache.cc \
-       HttpTransactCache.h \
        HttpTransactHeaders.cc \
        HttpTransactHeaders.h \
        HttpTunnel.cc \

Reply via email to