Use module partitions instead of full modules (#1146)
Some checks failed
Build / Bazel, cl, windows-latest (push) Has been cancelled
Build / Bazel, clang++, macos-latest (push) Has been cancelled
Build / Bazel, clang++, ubuntu-latest (push) Has been cancelled
Build / Bazel, g++, macos-latest (push) Has been cancelled
Build / Bazel, g++, ubuntu-latest (push) Has been cancelled
Build / CMake, cl, windows-latest (push) Has been cancelled
Build / CMake, gcc, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, macos-latest (push) Has been cancelled
Build / Test modules (llvm, ubuntu-latest) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled

Follow-up to #1015. This pull request replaces the full modules that represent headers, with partitions, to emphasise the belonging of the header to the module. This should hopefully provide a speedup to compilation, and confuse users less by aggregating the usable modules into a smaller set.
This commit is contained in:
Miko
2025-11-12 12:42:37 +00:00
committed by GitHub
parent e87d5ff95a
commit 229cae78b5
37 changed files with 140 additions and 149 deletions

View File

@@ -1,4 +1,4 @@
/// @module ftxui.component.animation
/// @module ftxui.component:Animation
/// @brief C++20 module interface for the Animation namespace of the Component module.
///
@@ -6,7 +6,7 @@ module;
#include <ftxui/component/animation.hpp>
export module ftxui.component.animation;
export module ftxui.component:Animation;
/**
* @namespace ftxui::animation
@@ -23,7 +23,7 @@ export namespace ftxui::animation {
/**
* @namespace easing
* @brief The FTXUI sf::animation::easing:: namespace
* @brief The FTXUI ftxui::animation::easing:: namespace
*/
namespace easing {
using ftxui::animation::easing::Function;

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.captured_mouse
/// @module ftxui.component.CapturedMouse
/// @brief Module file for the CapturedMouseInterface class of the Component module
module;
#include <ftxui/component/captured_mouse.hpp>
export module ftxui.component.captured_mouse;
export module ftxui.component:CapturedMouse;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.component
/// @module ftxui.component:Component
/// @brief Module file for the Component classes of the Component module
module;
#include <ftxui/component/component.hpp>
export module ftxui.component.component;
export module ftxui.component:Component;
/**
* @namespace ftxui
@@ -28,6 +28,10 @@ export namespace ftxui {
using ftxui::operator|;
using ftxui::operator|=;
/**
* @namespace Container
* @brief The FTXUI ftxui::Container:: namespace
*/
namespace Container {
using ftxui::Container::Vertical;
using ftxui::Container::Horizontal;

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.component_base
/// @module ftxui.component:ComponentBase
/// @brief Module file for the ComponentBase class of the Component module
module;
#include <ftxui/component/component_base.hpp>
export module ftxui.component.component_base;
export module ftxui.component:ComponentBase;
/**
* @namespace ftxui
@@ -16,6 +16,10 @@ export namespace ftxui {
using ftxui::Focus;
using ftxui::Event;
/**
* @namespace animation
* @brief The FTXUI ftxui::animation:: namespace
*/
namespace animation {
using ftxui::animation::Params;
}

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.component_options
/// @module ftxui.component:ComponentOptions
/// @brief Module file for options for the Component class of the Component module
module;
#include <ftxui/component/component_options.hpp>
export module ftxui.component.component_options;
export module ftxui.component:ComponentOptions;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.event
/// @module ftxui.component:Event
/// @brief Module file for the Event struct of the Component module
module;
#include <ftxui/component/event.hpp>
export module ftxui.component.event;
export module ftxui.component:Event;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.loop
/// @module ftxui.component:Loop
/// @brief Module file for the Loop class of the Component module
module;
#include <ftxui/component/loop.hpp>
export module ftxui.component.loop;
export module ftxui.component:Loop;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.mouse
/// @module ftxui.component:Mouse
/// @brief Module file for the Mouse struct of the Component module
module;
#include <ftxui/component/mouse.hpp>
export module ftxui.component.mouse;
export module ftxui.component:Mouse;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.receiver
/// @module ftxui.component:Receiver
/// @brief Module file for the Receiver class of the Component module
module;
#include <ftxui/component/receiver.hpp>
export module ftxui.component.receiver;
export module ftxui.component:Receiver;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.screen_interactive
/// @module ftxui.component:ScreenInteractive
/// @brief Module file for the ScreenInteractive class of the Component module
module;
#include <ftxui/component/screen_interactive.hpp>
export module ftxui.component.screen_interactive;
export module ftxui.component:ScreenInteractive;
/**
* @namespace ftxui

View File

@@ -1,11 +1,11 @@
/// @module ftxui.component.task
/// @module ftxui.component:Task
/// @brief Module file for the Task class of the Component module
module;
#include <ftxui/component/task.hpp>
export module ftxui.component.task;
export module ftxui.component:Task;
/**
* @namespace ftxui