From 567bda5e0f6fc02430b4ce1843189b795e137344 Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Fri, 23 Aug 2024 18:43:54 -0400 Subject: [PATCH 1/3] [build] workerd/io target cleanup, fold up IoContext::reportPromiseRejectEvent() - Dissolve glob in io target - Isolate more source files into smaller target - reportPromiseRejectEvent() does not involve IoContext internals and is only used within Worker, fold it into worker.c++. This makes io easier to maintain and makes the target a bit smaller. --- src/workerd/io/BUILD.bazel | 72 ++++++++++++++++++++--------------- src/workerd/io/io-context.c++ | 4 -- src/workerd/io/io-context.h | 8 ++-- src/workerd/io/worker.c++ | 2 +- 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/src/workerd/io/BUILD.bazel b/src/workerd/io/BUILD.bazel index a3ae7f42010..e4581ad0228 100644 --- a/src/workerd/io/BUILD.bazel +++ b/src/workerd/io/BUILD.bazel @@ -15,41 +15,51 @@ config_setting( flag_values = {"enable_experimental_webgpu": "True"}, ) +# TODO(cleanup): Split up into smaller targets, although this target is already relatively small and +# not encumbered with many dependencies. +wd_cc_library( + name = "io-helpers", + srcs = [ + "io-thread-context.c++", + "io-timers.c++", + "request-tracker.c++", + ], + hdrs = [ + "io-thread-context.h", + "io-timers.h", + "request-tracker.h", + ], + visibility = ["//visibility:public"], + deps = [ + "//src/workerd/jsg", + "@capnp-cpp//src/capnp/compat:http-over-capnp", + ], +) + wd_cc_library( name = "io", # HACK: Currently, the `io` and `api` packages are interdependent. We fold all the sources # from `api` into `io`. In principle, it should be possible to pull them apart so `api` - # depends on `io` but not vice versa. + # depends on `io` but not vice versa. In practice, this appears very difficult due to the + # IoContext -> Worker -> ServiceWorkerGlobalScope -> (various api targets) dependency chain. # TODO(cleanup): Fix this. - srcs = glob( - ["*.c++"], - exclude = [ - "worker-interface.c++", - "*-test.c++", - "trace.c++", - "io-gate.c++", - "observer.c++", - "actor-cache.c++", - "actor-sqlite.c++", - "actor-storage.c++", - "worker-entrypoint.c++", - ], - ) + ["//src/workerd/api:srcs"], - hdrs = glob( - ["*.h"], - exclude = [ - "actor-id.h", - "actor-cache.h", - "actor-sqlite.h", - "actor-storage.h", - "io-channels.h", - "io-gate.h", - "trace.h", - "observer.h", - "worker-entrypoint.h", - "worker-interface.h", - ], - ) + ["//src/workerd/api:hdrs"], + srcs = [ + "compatibility-date.c++", + "features.c++", + "hibernation-manager.c++", + "io-context.c++", + "io-own.c++", + "worker.c++", + ] + ["//src/workerd/api:srcs"], + hdrs = [ + "compatibility-date.h", + "features.h", + "hibernation-manager.h", + "io-context.h", + "io-own.h", + "promise-wrapper.h", + "worker.h", + ] + ["//src/workerd/api:hdrs"], defines = select({ ":set_enable_experimental_webgpu": ["WORKERD_EXPERIMENTAL_ENABLE_WEBGPU"], "//conditions:default": [], @@ -68,6 +78,8 @@ wd_cc_library( ":capnp", ":io-channels", ":io-gate", + ":io-helpers", + ":limit-enforcer", ":observer", ":trace", ":worker-interface", diff --git a/src/workerd/io/io-context.c++ b/src/workerd/io/io-context.c++ index 109bf7048b1..46e9905d135 100644 --- a/src/workerd/io/io-context.c++ +++ b/src/workerd/io/io-context.c++ @@ -376,10 +376,6 @@ void IoContext::logUncaughtExceptionAsync( runImpl(runnable, false, Worker::Lock::TakeSynchronously(metrics), kj::none, true); } -void IoContext::reportPromiseRejectEvent(v8::PromiseRejectMessage& message) { - KJ_REQUIRE_NONNULL(currentLock).reportPromiseRejectEvent(message); -} - void IoContext::addTask(kj::Promise promise) { ++addTaskCounter; diff --git a/src/workerd/io/io-context.h b/src/workerd/io/io-context.h index d3cd57c94ba..4f3cad16789 100644 --- a/src/workerd/io/io-context.h +++ b/src/workerd/io/io-context.h @@ -8,9 +8,9 @@ #include #include #include "io-own.h" -#include "io-timers.h" -#include "io-thread-context.h" -#include "limit-enforcer.h" +#include "workerd/io/io-timers.h" +#include "workerd/io/io-thread-context.h" +#include "workerd/io/limit-enforcer.h" #include #include "worker.h" #include @@ -309,8 +309,6 @@ class IoContext final: public kj::Refcounted, private kj::TaskSet::ErrorHandler // "current". void logUncaughtExceptionAsync(UncaughtExceptionSource source, kj::Exception&& e); - void reportPromiseRejectEvent(v8::PromiseRejectMessage& message); - // Returns a promise that will reject with an exception if and when the request should be // aborted, e.g. because its CPU time expired. This should be joined with any promises for // incoming tasks. diff --git a/src/workerd/io/worker.c++ b/src/workerd/io/worker.c++ index efc4d99c6d8..eeea3268f8e 100644 --- a/src/workerd/io/worker.c++ +++ b/src/workerd/io/worker.c++ @@ -1091,7 +1091,7 @@ Worker::Isolate::Isolate(kj::Own apiParam, // doesn't currently provide an easy way to do this. if (IoContext::hasCurrent()) { try { - IoContext::current().reportPromiseRejectEvent(message); + IoContext::current().getCurrentLock().reportPromiseRejectEvent(message); } catch (jsg::JsExceptionThrown&) { // V8 expects us to just return. return; From fc7f91d59e114f697784e9a2caf9b0e3e93f46c2 Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Fri, 23 Aug 2024 19:29:41 -0400 Subject: [PATCH 2/3] [nfc] Extended api include cleanup aided by include-what-you-use - Add _LIBCPP_REMOVE_TRANSITIVE_INCLUDES to compile_flags.txt so errors for missing headers are available within the editor too --- compile_flags.txt | 1 + src/workerd/api/actor-state.h | 6 ++++-- src/workerd/api/api-rtti-test.c++ | 5 +++++ src/workerd/api/basics.h | 2 +- src/workerd/api/blob.c++ | 2 +- src/workerd/api/crypto/aes.c++ | 5 +++-- src/workerd/api/crypto/crypto.c++ | 4 ++-- src/workerd/api/crypto/crypto.h | 4 ++-- src/workerd/api/crypto/ec.h | 3 +-- src/workerd/api/crypto/impl.c++ | 3 ++- src/workerd/api/crypto/impl.h | 5 +++-- src/workerd/api/crypto/pbkdf2.c++ | 3 ++- src/workerd/api/crypto/rsa.h | 2 +- src/workerd/api/crypto/scrypt.c++ | 2 +- src/workerd/api/global-scope.c++ | 1 + src/workerd/api/global-scope.h | 7 +++++-- src/workerd/api/hibernatable-web-socket.h | 1 + src/workerd/api/http.c++ | 1 + src/workerd/api/http.h | 6 +----- src/workerd/api/kv.h | 8 ++++++-- src/workerd/api/modules.h | 1 - src/workerd/api/node/crypto.h | 1 - src/workerd/api/r2-bucket.h | 5 +---- src/workerd/api/r2-rpc.h | 5 ++++- src/workerd/api/rtti.c++ | 3 +++ src/workerd/api/rtti.h | 2 +- src/workerd/api/scheduled.c++ | 1 + src/workerd/api/sockets.c++ | 4 ++++ src/workerd/api/sockets.h | 7 +++---- src/workerd/api/sql.h | 3 +-- src/workerd/api/streams/internal.h | 1 + src/workerd/api/system-streams.h | 2 +- src/workerd/api/trace.h | 1 + src/workerd/api/web-socket.h | 3 ++- src/workerd/io/actor-cache.h | 2 +- src/workerd/io/actor-storage.c++ | 1 + src/workerd/io/actor-storage.h | 2 -- src/workerd/io/io-context.h | 10 ++++++---- src/workerd/io/worker.h | 1 - src/workerd/server/workerd-api.c++ | 6 +++--- src/workerd/server/workerd-api.h | 15 +++++++++++++-- src/workerd/tests/test-fixture.c++ | 1 + 42 files changed, 92 insertions(+), 56 deletions(-) diff --git a/compile_flags.txt b/compile_flags.txt index 0f7c9e8e0c3..bb0790efd14 100644 --- a/compile_flags.txt +++ b/compile_flags.txt @@ -50,6 +50,7 @@ -isystemexternal/sqlite3 -isystemexternal/perfetto-sdk/sdk -D_FORTIFY_SOURCE=1 +-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -DCAPNP_VERSION=11000 -DDEBUG -DGOOGLE3 diff --git a/src/workerd/api/actor-state.h b/src/workerd/api/actor-state.h index e3352893a5f..941c6b723c7 100644 --- a/src/workerd/api/actor-state.h +++ b/src/workerd/api/actor-state.h @@ -8,8 +8,10 @@ // See actor.h for APIs used by other Workers to talk to Actors. #include -#include -#include +#include +#include +#include +#include #include #include diff --git a/src/workerd/api/api-rtti-test.c++ b/src/workerd/api/api-rtti-test.c++ index cc07fd8b8f5..40b1ad8552b 100644 --- a/src/workerd/api/api-rtti-test.c++ +++ b/src/workerd/api/api-rtti-test.c++ @@ -8,16 +8,21 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include #include +#include #include #include +#include // Test building rtti for various APIs. diff --git a/src/workerd/api/basics.h b/src/workerd/api/basics.h index 43a1411d21c..c4af38453df 100644 --- a/src/workerd/api/basics.h +++ b/src/workerd/api/basics.h @@ -8,7 +8,7 @@ // TODO(cleanp): Rename to events.h? #include -#include +#include #include #include #include diff --git a/src/workerd/api/blob.c++ b/src/workerd/api/blob.c++ index bb0eaa62aab..11c3bea8433 100644 --- a/src/workerd/api/blob.c++ +++ b/src/workerd/api/blob.c++ @@ -3,8 +3,8 @@ // https://opensource.org/licenses/Apache-2.0 #include "blob.h" -#include "streams.h" #include "util.h" +#include #include #include diff --git a/src/workerd/api/crypto/aes.c++ b/src/workerd/api/crypto/aes.c++ index dda1253e808..bf954f72e2d 100644 --- a/src/workerd/api/crypto/aes.c++ +++ b/src/workerd/api/crypto/aes.c++ @@ -6,9 +6,10 @@ #include #include #include +#include #include -#include -#include +#include +#include #include namespace workerd::api { diff --git a/src/workerd/api/crypto/crypto.c++ b/src/workerd/api/crypto/crypto.c++ index b27ccdbb813..7716b9cce7d 100644 --- a/src/workerd/api/crypto/crypto.c++ +++ b/src/workerd/api/crypto/crypto.c++ @@ -5,8 +5,8 @@ #include "crypto.h" #include "impl.h" #include -#include -#include +#include +#include #include #include #include diff --git a/src/workerd/api/crypto/crypto.h b/src/workerd/api/crypto/crypto.h index 1963fd943f5..e816288d0b9 100644 --- a/src/workerd/api/crypto/crypto.h +++ b/src/workerd/api/crypto/crypto.h @@ -10,8 +10,8 @@ #include #include #include -#include -#include "../streams.h" +#include +#include // for EVP_MD_CTX, X509 namespace workerd::api { namespace node { diff --git a/src/workerd/api/crypto/ec.h b/src/workerd/api/crypto/ec.h index 246cc689118..26c39ffa509 100644 --- a/src/workerd/api/crypto/ec.h +++ b/src/workerd/api/crypto/ec.h @@ -2,8 +2,7 @@ #include "impl.h" #include "keys.h" -#include -#include +#include #include namespace workerd::api { diff --git a/src/workerd/api/crypto/impl.c++ b/src/workerd/api/crypto/impl.c++ index 978b3a37a53..c49dd3c0f82 100644 --- a/src/workerd/api/crypto/impl.c++ +++ b/src/workerd/api/crypto/impl.c++ @@ -9,10 +9,11 @@ #include #include #include +#include #include #include #include -#include +#include namespace workerd::api { namespace { diff --git a/src/workerd/api/crypto/impl.h b/src/workerd/api/crypto/impl.h index 16c0bf20ce8..4e0b355f8c4 100644 --- a/src/workerd/api/crypto/impl.h +++ b/src/workerd/api/crypto/impl.h @@ -10,8 +10,9 @@ #include "crypto.h" #include #include -#include -#include +#include +#include +#include typedef struct bignum_st BIGNUM; diff --git a/src/workerd/api/crypto/pbkdf2.c++ b/src/workerd/api/crypto/pbkdf2.c++ index 3d9f1ddf696..c99588ba279 100644 --- a/src/workerd/api/crypto/pbkdf2.c++ +++ b/src/workerd/api/crypto/pbkdf2.c++ @@ -4,7 +4,8 @@ #include "impl.h" #include -#include +#include +#include namespace workerd::api { namespace { diff --git a/src/workerd/api/crypto/rsa.h b/src/workerd/api/crypto/rsa.h index b8c8470ff02..ca580ae4701 100644 --- a/src/workerd/api/crypto/rsa.h +++ b/src/workerd/api/crypto/rsa.h @@ -2,7 +2,7 @@ #include "crypto.h" #include "keys.h" -#include +#include #include #include diff --git a/src/workerd/api/crypto/scrypt.c++ b/src/workerd/api/crypto/scrypt.c++ index 6339797fb4c..87f29bf276e 100644 --- a/src/workerd/api/crypto/scrypt.c++ +++ b/src/workerd/api/crypto/scrypt.c++ @@ -4,7 +4,7 @@ #include "impl.h" #include -#include +#include namespace workerd::api { diff --git a/src/workerd/api/global-scope.c++ b/src/workerd/api/global-scope.c++ index 46f8e45ad15..5fa8bef8264 100644 --- a/src/workerd/api/global-scope.c++ +++ b/src/workerd/api/global-scope.c++ @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/src/workerd/api/global-scope.h b/src/workerd/api/global-scope.h index 46b5a1aff1a..50548dcec52 100644 --- a/src/workerd/api/global-scope.h +++ b/src/workerd/api/global-scope.h @@ -6,9 +6,7 @@ #include #include "basics.h" -#include "events.h" #include "http.h" -#include "eventsource.h" #include "hibernation-event-params.h" #include #ifdef WORKERD_EXPERIMENTAL_ENABLE_WEBGPU @@ -26,12 +24,17 @@ class Cache; class CacheStorage; class Crypto; class CryptoKey; +class ErrorEvent; +class EventSource; +class FixedLengthStream; class SubtleCrypto; class TextDecoder; class TextEncoder; class HTMLRewriter; +class IdentityTransformStream; class Response; class TraceItem; +class TransformStream; class ScheduledController; class ScheduledEvent; class ReadableStream; diff --git a/src/workerd/api/hibernatable-web-socket.h b/src/workerd/api/hibernatable-web-socket.h index f0451b0908a..788303439db 100644 --- a/src/workerd/api/hibernatable-web-socket.h +++ b/src/workerd/api/hibernatable-web-socket.h @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/src/workerd/api/http.c++ b/src/workerd/api/http.c++ index c1f7c6bea4a..b8e0a13308d 100644 --- a/src/workerd/api/http.c++ +++ b/src/workerd/api/http.c++ @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/src/workerd/api/http.h b/src/workerd/api/http.h index 4d1b433b96d..1ba5c1dd867 100644 --- a/src/workerd/api/http.h +++ b/src/workerd/api/http.h @@ -6,16 +6,14 @@ #include #include -#include #include #include #include "basics.h" #include "cf-property.h" -#include "streams.h" +#include #include "form-data.h" #include "web-socket.h" #include "url.h" -#include "url-standard.h" #include "blob.h" #include #include "worker-rpc.h" @@ -23,8 +21,6 @@ namespace workerd::api { -struct QueueResponse; - class Headers final: public jsg::Object { private: template diff --git a/src/workerd/api/kv.h b/src/workerd/api/kv.h index 6891eb49552..40bf714d7b9 100644 --- a/src/workerd/api/kv.h +++ b/src/workerd/api/kv.h @@ -4,10 +4,14 @@ #pragma once -#include -#include "streams.h" +#include #include +#include +namespace kj { +class HttpClient; +class HttpHeaders; +} // namespace kj namespace workerd { class IoContext; } diff --git a/src/workerd/api/modules.h b/src/workerd/api/modules.h index 666e51263f8..a0c968e2ef6 100644 --- a/src/workerd/api/modules.h +++ b/src/workerd/api/modules.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/workerd/api/node/crypto.h b/src/workerd/api/node/crypto.h index 7e9dc2a5e9c..be2a0eeb647 100644 --- a/src/workerd/api/node/crypto.h +++ b/src/workerd/api/node/crypto.h @@ -8,7 +8,6 @@ #include #include #include -#include namespace workerd::api::node { diff --git a/src/workerd/api/r2-bucket.h b/src/workerd/api/r2-bucket.h index c1be7e3ea14..b42bb1a4811 100644 --- a/src/workerd/api/r2-bucket.h +++ b/src/workerd/api/r2-bucket.h @@ -7,10 +7,7 @@ #include "r2-rpc.h" #include -#include "streams.h" -#include -#include -#include +#include namespace workerd::api { class Headers; diff --git a/src/workerd/api/r2-rpc.h b/src/workerd/api/r2-rpc.h index 62bf13d8d51..d3b5d703c2f 100644 --- a/src/workerd/api/r2-rpc.h +++ b/src/workerd/api/r2-rpc.h @@ -4,10 +4,13 @@ #pragma once -#include #include #include +namespace kj { +class HttpClient; +} + namespace workerd::api { class ReadableStreamSource; diff --git a/src/workerd/api/rtti.c++ b/src/workerd/api/rtti.c++ index 42a5960cb66..80a2b34802f 100644 --- a/src/workerd/api/rtti.c++ +++ b/src/workerd/api/rtti.c++ @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -32,8 +33,10 @@ #include #include #include +#include #include #include +#include #include diff --git a/src/workerd/api/rtti.h b/src/workerd/api/rtti.h index 3548a45429a..848507c4f74 100644 --- a/src/workerd/api/rtti.h +++ b/src/workerd/api/rtti.h @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/workerd/api/scheduled.c++ b/src/workerd/api/scheduled.c++ index f451e2d0ff6..888161f459d 100644 --- a/src/workerd/api/scheduled.c++ +++ b/src/workerd/api/scheduled.c++ @@ -3,6 +3,7 @@ // https://opensource.org/licenses/Apache-2.0 #include "scheduled.h" +#include namespace workerd::api { diff --git a/src/workerd/api/sockets.c++ b/src/workerd/api/sockets.c++ index 1ac5ab51df3..7f17a801b04 100644 --- a/src/workerd/api/sockets.c++ +++ b/src/workerd/api/sockets.c++ @@ -460,4 +460,8 @@ jsg::Promise Socket::maybeCloseWriteSide(jsg::Lock& js) { })); } +jsg::Ref SocketsModule::connect( + jsg::Lock& js, AnySocketAddress address, jsg::Optional options) { + return connectImpl(js, kj::none, kj::mv(address), kj::mv(options)); +} } // namespace workerd::api diff --git a/src/workerd/api/sockets.h b/src/workerd/api/sockets.h index 94be522cde7..ecfb04c9fb2 100644 --- a/src/workerd/api/sockets.h +++ b/src/workerd/api/sockets.h @@ -8,7 +8,8 @@ #include #include #include -#include "streams.h" +#include +#include namespace workerd::api { @@ -240,9 +241,7 @@ class SocketsModule final: public jsg::Object { SocketsModule(jsg::Lock&, const jsg::Url&) {} jsg::Ref connect( - jsg::Lock& js, AnySocketAddress address, jsg::Optional options) { - return connectImpl(js, kj::none, kj::mv(address), kj::mv(options)); - } + jsg::Lock& js, AnySocketAddress address, jsg::Optional options); JSG_RESOURCE_TYPE(SocketsModule) { JSG_METHOD(connect); diff --git a/src/workerd/api/sql.h b/src/workerd/api/sql.h index b60f9f2bdef..18360e063ec 100644 --- a/src/workerd/api/sql.h +++ b/src/workerd/api/sql.h @@ -8,11 +8,10 @@ #include #include #include +#include namespace workerd::api { -class DurableObjectStorage; - class SqlStorage final: public jsg::Object, private SqliteDatabase::Regulator { public: SqlStorage(SqliteDatabase& sqlite, jsg::Ref storage); diff --git a/src/workerd/api/streams/internal.h b/src/workerd/api/streams/internal.h index cb759c2522e..64c598002b8 100644 --- a/src/workerd/api/streams/internal.h +++ b/src/workerd/api/streams/internal.h @@ -5,6 +5,7 @@ #pragma once #include "common.h" +#include "writable.h" #include #include diff --git a/src/workerd/api/system-streams.h b/src/workerd/api/system-streams.h index bdcbce6a43e..7066cd1c882 100644 --- a/src/workerd/api/system-streams.h +++ b/src/workerd/api/system-streams.h @@ -6,7 +6,7 @@ // Implementations of ReadableStreamSource / WritableStreamSink which wrap system streams (sockets), // handle encoding/decoding, and optimize pumping between them when possible. -#include "streams.h" +#include // for StreamEncoding, ... #include "http.h" #include #include diff --git a/src/workerd/api/trace.h b/src/workerd/api/trace.h index 2f33e18c8d3..d2dae3cfee6 100644 --- a/src/workerd/api/trace.h +++ b/src/workerd/api/trace.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace workerd::api { diff --git a/src/workerd/api/web-socket.h b/src/workerd/api/web-socket.h index f28cddbeafa..5b5aa69f14f 100644 --- a/src/workerd/api/web-socket.h +++ b/src/workerd/api/web-socket.h @@ -7,7 +7,8 @@ #include #include #include "basics.h" -#include +#include +#include #include #include diff --git a/src/workerd/io/actor-cache.h b/src/workerd/io/actor-cache.h index 6af741301a2..e8878f7b952 100644 --- a/src/workerd/io/actor-cache.h +++ b/src/workerd/io/actor-cache.h @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/workerd/io/actor-storage.c++ b/src/workerd/io/actor-storage.c++ index 81feb6b3d68..439ffb7e52f 100644 --- a/src/workerd/io/actor-storage.c++ +++ b/src/workerd/io/actor-storage.c++ @@ -3,6 +3,7 @@ // https://opensource.org/licenses/Apache-2.0 #include "actor-storage.h" +#include #include diff --git a/src/workerd/io/actor-storage.h b/src/workerd/io/actor-storage.h index 9764eca2245..2d8e04a2666 100644 --- a/src/workerd/io/actor-storage.h +++ b/src/workerd/io/actor-storage.h @@ -7,8 +7,6 @@ #include #include -#include - namespace workerd { // This class wraps common values and functions for interacting durable object (actor) storage. class ActorStorageLimits { diff --git a/src/workerd/io/io-context.h b/src/workerd/io/io-context.h index 4f3cad16789..db6e836e7be 100644 --- a/src/workerd/io/io-context.h +++ b/src/workerd/io/io-context.h @@ -8,9 +8,8 @@ #include #include #include "io-own.h" -#include "workerd/io/io-timers.h" -#include "workerd/io/io-thread-context.h" -#include "workerd/io/limit-enforcer.h" +#include +#include #include #include "worker.h" #include @@ -22,10 +21,13 @@ #include #include #include -#include #include #include +namespace workerd { +class LimitEnforcer; +} + namespace capnp { class HttpOverCapnpFactory; } diff --git a/src/workerd/io/worker.h b/src/workerd/io/worker.h index 2eddc4ed941..1da2f81ba2a 100644 --- a/src/workerd/io/worker.h +++ b/src/workerd/io/worker.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include // because we can't forward-declare ActorCache::SharedLru. #include diff --git a/src/workerd/server/workerd-api.c++ b/src/workerd/server/workerd-api.c++ index 202777c8441..4d79b5804c9 100644 --- a/src/workerd/server/workerd-api.c++ +++ b/src/workerd/server/workerd-api.c++ @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -37,13 +39,11 @@ #include #include #include +#include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/workerd/server/workerd-api.h b/src/workerd/server/workerd-api.h index c975edd9376..b43364d3e9a 100644 --- a/src/workerd/server/workerd-api.h +++ b/src/workerd/server/workerd-api.h @@ -6,9 +6,20 @@ #include #include -#include #include -#include + +namespace workerd { +namespace api { +namespace pyodide { +struct PythonConfig; +} +} // namespace api +} // namespace workerd +namespace workerd { +namespace jsg { +class V8System; +} +} // namespace workerd namespace workerd::api { class MemoryCacheProvider; diff --git a/src/workerd/tests/test-fixture.c++ b/src/workerd/tests/test-fixture.c++ index 4259be1df3c..c12841688c6 100644 --- a/src/workerd/tests/test-fixture.c++ +++ b/src/workerd/tests/test-fixture.c++ @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include From dfc6952cbea84526da454f4387a9e3b7e265b51b Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Mon, 26 Aug 2024 10:35:49 -0400 Subject: [PATCH 3/3] [nfc] Mark crypto_scrypt-test as large This currently times out in debug and asan configurations on CI sometimes. --- src/workerd/api/node/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/src/workerd/api/node/BUILD.bazel b/src/workerd/api/node/BUILD.bazel index b0bf7ca68ef..1caf7c07f93 100644 --- a/src/workerd/api/node/BUILD.bazel +++ b/src/workerd/api/node/BUILD.bazel @@ -83,6 +83,7 @@ wd_test( ) wd_test( + size = "large", src = "tests/crypto_scrypt-test.wd-test", args = ["--experimental"], data = ["tests/crypto_scrypt-test.js"],