Skip to content

[macOS] Include <chrono> to fix _FilesystemClock build warning #18689

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

Conversation

devajithvs
Copy link
Contributor

@devajithvs devajithvs commented May 12, 2025

This Pull request:

Backport of: #18515

Changes or fixes:

Checklist:

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

This PR fixes #

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 marked this pull request as ready for review May 12, 2025 13:28
@devajithvs devajithvs requested review from dpiparo and pcanal as code owners May 12, 2025 13:28
Copy link

Test Results

    18 files      18 suites   3d 21h 17m 2s ⏱️
 2 746 tests  2 745 ✅ 0 💤 1 ❌
47 804 runs  47 803 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 9625351.

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.

For the future, it's good to use git cherry-pick -x to record the original commit hash in the backport commit

@devajithvs
Copy link
Contributor Author

For the future, it's good to use git cherry-pick -x to record the original commit hash in the backport commit

Oops. Thanks. Won't forget that next time.

@devajithvs devajithvs merged commit fa90bed into root-project:v6-36-00-patches May 13, 2025
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants