Browse Source

Userland: Remove workarounds for LibIPC include order sensitivity

Timothy Flynn 2 years ago
parent
commit
4fd9e3ab08

+ 0 - 2
Userland/Applications/Browser/Tab.h

@@ -14,8 +14,6 @@
 #include <LibGUI/Widget.h>
 #include <LibGfx/ShareableBitmap.h>
 #include <LibHTTP/Job.h>
-#include <LibWeb/Cookie/Cookie.h>
-#include <LibWeb/Cookie/ParsedCookie.h>
 #include <LibWeb/Forward.h>
 
 namespace WebView {

+ 1 - 3
Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp

@@ -9,6 +9,7 @@
 #include "BackgroundSettingsWidget.h"
 #include <AK/StringBuilder.h>
 #include <Applications/DisplaySettings/BackgroundSettingsGML.h>
+#include <LibConfig/Client.h>
 #include <LibCore/ConfigFile.h>
 #include <LibDesktop/Launcher.h>
 #include <LibGUI/Application.h>
@@ -26,9 +27,6 @@
 #include <LibGfx/Palette.h>
 #include <LibGfx/SystemTheme.h>
 
-// Including this after to avoid LibIPC errors
-#include <LibConfig/Client.h>
-
 namespace DisplaySettings {
 
 BackgroundSettingsWidget::BackgroundSettingsWidget(bool& background_settings_changed)

+ 1 - 3
Userland/Applications/KeyboardSettings/main.cpp

@@ -6,15 +6,13 @@
  */
 
 #include "KeyboardSettingsWidget.h"
+#include <LibConfig/Client.h>
 #include <LibCore/ArgsParser.h>
 #include <LibCore/System.h>
 #include <LibGUI/Application.h>
 #include <LibGUI/SettingsWindow.h>
 #include <LibMain/Main.h>
 
-// Including this after to avoid LibIPC errors
-#include <LibConfig/Client.h>
-
 ErrorOr<int> serenity_main(Main::Arguments arguments)
 {
     TRY(Core::System::pledge("stdio rpath recvfd sendfd unix proc exec"));

+ 1 - 3
Userland/Applications/SoundPlayer/main.cpp

@@ -5,9 +5,6 @@
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
-// FIXME: LibIPC Decoder and Encoder are sensitive to include order here
-#include <LibImageDecoderClient/Client.h>
-
 #include "AlbumCoverVisualizationWidget.h"
 #include "BarsVisualizationWidget.h"
 #include "Player.h"
@@ -24,6 +21,7 @@
 #include <LibGUI/Menubar.h>
 #include <LibGUI/Window.h>
 #include <LibGfx/CharacterBitmap.h>
+#include <LibImageDecoderClient/Client.h>
 #include <LibMain/Main.h>
 
 ErrorOr<int> serenity_main(Main::Arguments arguments)

+ 1 - 3
Userland/Applications/TerminalSettings/main.cpp

@@ -5,6 +5,7 @@
  */
 
 #include "TerminalSettingsWidget.h"
+#include <LibConfig/Client.h>
 #include <LibCore/ArgsParser.h>
 #include <LibCore/System.h>
 #include <LibGUI/Application.h>
@@ -12,9 +13,6 @@
 #include <LibGUI/SettingsWindow.h>
 #include <LibMain/Main.h>
 
-// Including this after to avoid LibIPC errors
-#include <LibConfig/Client.h>
-
 ErrorOr<int> serenity_main(Main::Arguments arguments)
 {
     TRY(Core::System::pledge("stdio rpath recvfd sendfd unix"));

+ 1 - 4
Userland/Applications/ThemeEditor/MainWidget.cpp

@@ -15,15 +15,12 @@
 #include <Applications/ThemeEditor/MetricPropertyGML.h>
 #include <Applications/ThemeEditor/PathPropertyGML.h>
 #include <Applications/ThemeEditor/ThemeEditorGML.h>
-// FIXME: LibIPC Decoder and Encoder are sensitive to include order here
-// clang-format off
-#include <LibGUI/ConnectionToWindowServer.h>
-// clang-format on
 #include <LibFileSystemAccessClient/Client.h>
 #include <LibGUI/ActionGroup.h>
 #include <LibGUI/Application.h>
 #include <LibGUI/BoxLayout.h>
 #include <LibGUI/Button.h>
+#include <LibGUI/ConnectionToWindowServer.h>
 #include <LibGUI/FilePicker.h>
 #include <LibGUI/Frame.h>
 #include <LibGUI/GroupBox.h>

+ 1 - 4
Userland/Libraries/LibFileSystemAccessClient/Client.cpp

@@ -5,13 +5,10 @@
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
-// FIXME: LibIPC Decoder and Encoder are sensitive to include order here
-// clang-format off
-#include <LibGUI/ConnectionToWindowServer.h>
-// clang-format on
 #include <AK/LexicalPath.h>
 #include <LibCore/File.h>
 #include <LibFileSystemAccessClient/Client.h>
+#include <LibGUI/ConnectionToWindowServer.h>
 #include <LibGUI/MessageBox.h>
 #include <LibGUI/Window.h>
 

+ 1 - 3
Userland/Libraries/LibGUI/Desktop.cpp

@@ -7,13 +7,11 @@
 
 #include <AK/Badge.h>
 #include <AK/TemporaryChange.h>
+#include <LibConfig/Client.h>
 #include <LibGUI/ConnectionToWindowServer.h>
 #include <LibGUI/Desktop.h>
 #include <string.h>
 
-// Including this after to avoid LibIPC errors
-#include <LibConfig/Client.h>
-
 namespace GUI {
 
 Desktop& Desktop::the()

+ 0 - 2
Userland/Libraries/LibProtocol/RequestClient.h

@@ -7,8 +7,6 @@
 #pragma once
 
 #include <AK/HashMap.h>
-// Need to include this before RequestClientEndpoint.h as that one includes LibIPC/(De En)coder.h, which would bomb if included before this.
-#include <LibCore/Proxy.h>
 #include <LibIPC/ConnectionToServer.h>
 #include <RequestServer/RequestClientEndpoint.h>
 #include <RequestServer/RequestServerEndpoint.h>

+ 0 - 1
Userland/Libraries/LibWebView/WebContentClient.h

@@ -8,7 +8,6 @@
 
 #include <AK/HashMap.h>
 #include <LibIPC/ConnectionToServer.h>
-#include <LibWeb/Cookie/ParsedCookie.h>
 #include <WebContent/WebContentClientEndpoint.h>
 #include <WebContent/WebContentServerEndpoint.h>
 

+ 1 - 4
Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp

@@ -4,15 +4,12 @@
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
-// FIXME: LibIPC Decoder and Encoder are sensitive to include order here
-// clang-format off
-#include <LibGUI/ConnectionToWindowServer.h>
-// clang-format on
 #include <AK/Debug.h>
 #include <FileSystemAccessServer/ConnectionFromClient.h>
 #include <LibCore/File.h>
 #include <LibCore/IODevice.h>
 #include <LibGUI/Application.h>
+#include <LibGUI/ConnectionToWindowServer.h>
 #include <LibGUI/FilePicker.h>
 #include <LibGUI/MessageBox.h>
 

+ 1 - 3
Userland/Services/NotificationServer/ConnectionFromClient.h

@@ -7,11 +7,9 @@
 #pragma once
 
 #include <LibIPC/ConnectionFromClient.h>
-#include <WindowServer/ScreenLayout.h>
-
-// Must be included after WindowServer/ScreenLayout.h
 #include <NotificationServer/NotificationClientEndpoint.h>
 #include <NotificationServer/NotificationServerEndpoint.h>
+#include <WindowServer/ScreenLayout.h>
 
 namespace NotificationServer {
 

+ 0 - 2
Userland/Services/RequestServer/ConnectionFromClient.h

@@ -7,8 +7,6 @@
 #pragma once
 
 #include <AK/HashMap.h>
-// Need to include this before RequestClientEndpoint.h as that one includes LibIPC/(De En)coder.h, which would bomb if included before this.
-#include <LibCore/Proxy.h>
 #include <LibIPC/ConnectionFromClient.h>
 #include <RequestServer/Forward.h>
 #include <RequestServer/RequestClientEndpoint.h>

+ 0 - 1
Userland/Services/WebContent/ConnectionFromClient.cpp

@@ -19,7 +19,6 @@
 #include <LibJS/Parser.h>
 #include <LibJS/Runtime/ConsoleObject.h>
 #include <LibWeb/Bindings/MainThreadVM.h>
-#include <LibWeb/Cookie/ParsedCookie.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/HTML/BrowsingContext.h>

+ 0 - 1
Userland/Services/WebContent/ConnectionFromClient.h

@@ -13,7 +13,6 @@
 #include <LibJS/Forward.h>
 #include <LibJS/Heap/Handle.h>
 #include <LibWeb/CSS/PreferredColorScheme.h>
-#include <LibWeb/Cookie/ParsedCookie.h>
 #include <LibWeb/Forward.h>
 #include <LibWeb/Loader/FileRequest.h>
 #include <LibWeb/Platform/Timer.h>

+ 0 - 3
Userland/Services/WebContent/WebContentClient.ipc

@@ -4,9 +4,6 @@
 #include <LibWeb/Cookie/Cookie.h>
 #include <LibWeb/Cookie/ParsedCookie.h>
 
-// FIXME: This isn't used here, but the generated IPC fails to compile without this include.
-#include <LibWeb/WebDriver/Response.h>
-
 endpoint WebContentClient
 {
     did_start_loading(URL url) =|

+ 2 - 4
Userland/Services/WindowServer/ScreenLayout.ipp

@@ -6,15 +6,13 @@
 
 #include <AK/ScopeGuard.h>
 #include <Kernel/API/Graphics.h>
+#include <LibIPC/Decoder.h>
+#include <LibIPC/Encoder.h>
 #include <Services/WindowServer/ScreenLayout.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
 
-// Must be included after LibIPC/Forward.h
-#include <LibIPC/Decoder.h>
-#include <LibIPC/Encoder.h>
-
 namespace WindowServer {
 
 bool ScreenLayout::is_valid(String* error_msg) const