Skip to content

[runtime_cxxmodules] Fix '_FilesystemClock' build warning with macos 15.4 and mac-beta #18515

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

Merged
merged 1 commit into from
May 12, 2025

Conversation

devajithvs
Copy link
Contributor

@devajithvs devajithvs commented Apr 25, 2025

This Pull request:

Including chrono first forces the private clock module to be imported before fstream transitively includes filesystem

Fixes the warning:

[79/2727] Generating G__Core.cxx, ../lib/Core.pcm
In module 'std' imported from input_line_1:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/time_point.h:33:52: error: definition of '_FilesystemClock' must be imported from module 'std.std_private_chrono_file_clock' before it is required
template <class _Clock, class _Duration = typename _Clock::duration>
                                                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/time_point.h:33:1: note: in instantiation of default argument for 'time_point<std::filesystem::_FilesystemClock>' required here
template <class _Clock, class _Duration = typename _Clock::duration>
^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/file_clock.h:49:8: note: definition here is not reachable
struct _FilesystemClock {

Upstream issue: llvm/llvm-project#138683

Changes or fixes:

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR fixes #

@devajithvs devajithvs force-pushed the FilesystemClock.fix branch from d470f59 to 58f80ab Compare April 25, 2025 13:49
@pcanal
Copy link
Member

pcanal commented Apr 25, 2025

Does this relate to: #16494 (see also the (many) comments)

@devajithvs
Copy link
Contributor Author

Oops, yes. Did not keep track of that. Thanks :)

Copy link

github-actions bot commented Apr 28, 2025

Test Results

    18 files      18 suites   4d 6h 22m 27s ⏱️
 2 736 tests  2 696 ✅   0 💤 40 ❌
47 866 runs  47 621 ✅ 205 💤 40 ❌

For more details on these failures, see this check.

Results for commit 22a4948.

♻️ This comment has been updated with latest results.

@devajithvs devajithvs force-pushed the FilesystemClock.fix branch from 2d0cbd9 to e58df92 Compare May 9, 2025 08:26
@devajithvs devajithvs requested review from hahnjo and vgvassilev May 9, 2025 08:27
@devajithvs devajithvs marked this pull request as ready for review May 9, 2025 08:27
@devajithvs devajithvs requested review from dpiparo and pcanal as code owners May 9, 2025 08:27
@devajithvs devajithvs added the clean build Ask CI to do non-incremental build on PR label May 9, 2025
@devajithvs devajithvs closed this May 9, 2025
@devajithvs devajithvs reopened this May 9, 2025
Including <chrono> first forces the private clock module to be imported
before <fstream> transitively includes <filesystem>

Fixes the warning:
```
[79/2727] Generating G__Core.cxx, ../lib/Core.pcm
In module 'std' imported from input_line_1:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/time_point.h:33:52: error: definition of '_FilesystemClock' must be imported from module 'std.std_private_chrono_file_clock' before it is required
template <class _Clock, class _Duration = typename _Clock::duration>
                                                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/time_point.h:33:1: note: in instantiation of default argument for 'time_point<std::filesystem::_FilesystemClock>' required here
template <class _Clock, class _Duration = typename _Clock::duration>
^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/file_clock.h:49:8: note: definition here is not reachable
struct _FilesystemClock {
```
@devajithvs devajithvs force-pushed the FilesystemClock.fix branch from e58df92 to 22a4948 Compare May 10, 2025 09:16
Copy link
Member

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@devajithvs devajithvs merged commit 00bccd4 into root-project:master May 12, 2025
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean build Ask CI to do non-incremental build on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants