diff --git a/src/workerd/api/BUILD.bazel b/src/workerd/api/BUILD.bazel index 3c31ec6b4e2..771df5cd803 100644 --- a/src/workerd/api/BUILD.bazel +++ b/src/workerd/api/BUILD.bazel @@ -8,6 +8,9 @@ filegroup( srcs = glob( ["**/*.c++"], exclude = [ + # TODO(cleanup): Continue shrinking the io target: Create independent targets for + # analytics-engine, kv, urlpattern and streams/compression, which either do not depend + # on io or do not have io depending on them. "**/*test*.c++", "data-url.c++", "encoding.c++", diff --git a/src/workerd/api/analytics-engine.c++ b/src/workerd/api/analytics-engine.c++ index 49bd5433379..6c6ed66bb4f 100644 --- a/src/workerd/api/analytics-engine.c++ +++ b/src/workerd/api/analytics-engine.c++ @@ -4,6 +4,7 @@ #include "analytics-engine.h" +#include #include namespace workerd::api { diff --git a/src/workerd/api/analytics-engine.h b/src/workerd/api/analytics-engine.h index d2e16443ee9..64d9c9b9a83 100644 --- a/src/workerd/api/analytics-engine.h +++ b/src/workerd/api/analytics-engine.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/workerd/api/global-scope.c++ b/src/workerd/api/global-scope.c++ index cfee9034790..5ca1869aab2 100644 --- a/src/workerd/api/global-scope.c++ +++ b/src/workerd/api/global-scope.c++ @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/src/workerd/io/BUILD.bazel b/src/workerd/io/BUILD.bazel index ca87f5e474d..04032baafd7 100644 --- a/src/workerd/io/BUILD.bazel +++ b/src/workerd/io/BUILD.bazel @@ -57,7 +57,6 @@ wd_cc_library( srcs = [ "compatibility-date.c++", "features.c++", - "frankenvalue.c++", "hibernation-manager.c++", "io-context.c++", "io-own.c++", @@ -70,7 +69,6 @@ wd_cc_library( hdrs = [ "compatibility-date.h", "features.h", - "frankenvalue.h", "hibernation-manager.h", "io-channels.h", "io-context.h", @@ -100,7 +98,7 @@ wd_cc_library( ":actor-id", ":actor-storage_capnp", ":cdp_capnp", - ":frankenvalue_capnp", + ":frankenvalue", ":io-gate", ":io-helpers", ":limit-enforcer", @@ -159,6 +157,18 @@ wd_cc_library( ], ) +wd_cc_library( + name = "frankenvalue", + srcs = ["frankenvalue.c++"], + hdrs = ["frankenvalue.h"], + visibility = ["//visibility:public"], + deps = [ + ":frankenvalue_capnp", + "//src/workerd/jsg", + "@capnp-cpp//src/capnp:capnpc", + ], +) + wd_cc_library( name = "trace", srcs = ["trace.c++"], @@ -354,6 +364,6 @@ kj_test( kj_test( src = "frankenvalue-test.c++", deps = [ - ":io", + ":frankenvalue", ], ) diff --git a/src/workerd/io/features.h b/src/workerd/io/features.h index 2a00be1c4b8..28e0fb62809 100644 --- a/src/workerd/io/features.h +++ b/src/workerd/io/features.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include namespace workerd { diff --git a/src/workerd/io/io-channels.h b/src/workerd/io/io-channels.h index 52e3cbdf891..f08993e88c0 100644 --- a/src/workerd/io/io-channels.h +++ b/src/workerd/io/io-channels.h @@ -8,6 +8,7 @@ #include #include +#include // for Capability #include #include diff --git a/src/workerd/io/io-gate.h b/src/workerd/io/io-gate.h index 29b4fe85b3d..3f3b1f5ae54 100644 --- a/src/workerd/io/io-gate.h +++ b/src/workerd/io/io-gate.h @@ -24,8 +24,6 @@ #include #include -#include - namespace workerd { using kj::uint; diff --git a/src/workerd/io/io-own.c++ b/src/workerd/io/io-own.c++ index 925def361f2..e2f9fe14f18 100644 --- a/src/workerd/io/io-own.c++ +++ b/src/workerd/io/io-own.c++ @@ -2,6 +2,8 @@ #include "io-context.h" +#include + namespace workerd { #ifdef KJ_DEBUG diff --git a/src/workerd/io/io-own.h b/src/workerd/io/io-own.h index 4786104b747..cde31d5f5ae 100644 --- a/src/workerd/io/io-own.h +++ b/src/workerd/io/io-own.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include @@ -13,6 +12,9 @@ #include namespace workerd { +namespace jsg { +class Lock; +} class IoContext; diff --git a/src/workerd/io/worker-entrypoint.h b/src/workerd/io/worker-entrypoint.h index f6ad7ccc388..b1517196e9e 100644 --- a/src/workerd/io/worker-entrypoint.h +++ b/src/workerd/io/worker-entrypoint.h @@ -4,7 +4,7 @@ #pragma once -#include +#include #include namespace workerd { diff --git a/src/workerd/server/alarm-scheduler.c++ b/src/workerd/server/alarm-scheduler.c++ index 3c3c0b09b43..c22d436d4c3 100644 --- a/src/workerd/server/alarm-scheduler.c++ +++ b/src/workerd/server/alarm-scheduler.c++ @@ -4,6 +4,8 @@ #include "alarm-scheduler.h" +#include + namespace workerd::server { int AlarmScheduler::maxJitterMsForDelay(kj::Duration delay) { diff --git a/src/workerd/util/sqlite.h b/src/workerd/util/sqlite.h index 06e74a5f97e..7d0e3db98fd 100644 --- a/src/workerd/util/sqlite.h +++ b/src/workerd/util/sqlite.h @@ -5,8 +5,10 @@ #pragma once #include +#include #include #include +#include #include