Skip to content

[libc++][modules] Use submodules for stop_token #107441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Sep 5, 2024

The std_stop_token module was initially created with private headers, however it turns out that some headers under __stop_token are used outside of __stop_token (e.g. in <condition_variable>), so these must be submodules after all.

The std_stop_token module was initially created with private headers,
however it turns out that some headers under __stop_token are used
outside of __stop_token (e.g. in <condition_variable>), so these
must be submodules after all.
@ldionne ldionne requested a review from a team as a code owner September 5, 2024 18:17
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 5, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 5, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

The std_stop_token module was initially created with private headers, however it turns out that some headers under __stop_token are used outside of __stop_token (e.g. in <condition_variable>), so these must be submodules after all.


Full diff: https://github.com/llvm/llvm-project/pull/107441.diff

1 Files Affected:

  • (modified) libcxx/include/module.modulemap (+7-7)
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 3abc11723a5a92..2bed6b1a90a18b 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -294,13 +294,13 @@ module std_stdexcept [system] {
 }
 module std_stop_token [system] {
   header "stop_token"
-  private header "__stop_token/atomic_unique_lock.h"
-  private header "__stop_token/intrusive_list_view.h"
-  private header "__stop_token/intrusive_shared_ptr.h"
-  private header "__stop_token/stop_callback.h"
-  private header "__stop_token/stop_source.h"
-  private header "__stop_token/stop_state.h"
-  private header "__stop_token/stop_token.h"
+  module atomic_unique_lock     { header "__stop_token/atomic_unique_lock.h" }
+  module intrusive_list_view    { header "__stop_token/intrusive_list_view.h" }
+  module intrusive_shared_ptr   { header "__stop_token/intrusive_shared_ptr.h" }
+  module stop_callback          { header "__stop_token/stop_callback.h" }
+  module stop_source            { header "__stop_token/stop_source.h" }
+  module stop_state             { header "__stop_token/stop_state.h" }
+  module stop_token             { header "__stop_token/stop_token.h" }
   export *
 }
 module std_streambuf [system] {

@ldionne ldionne marked this pull request as draft September 5, 2024 22:11
@ldionne
Copy link
Member Author

ldionne commented Sep 5, 2024

Putting on hold since I might have found another approach that supersedes this change.

@ldionne
Copy link
Member Author

ldionne commented Sep 9, 2024

Closing since I don't think I will pursue this. This is superseded by #107638.

@ldionne ldionne closed this Sep 9, 2024
@ldionne ldionne deleted the review/modularization-stop_token-submodules branch September 9, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants