Skip to content
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

Switch a time type to fs:: #64314

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

jbytheway
Copy link
Contributor

Summary

None

Purpose of change

There were build errors on the OS X build. See for example this one. They seemed to only appear on the release build, not the PR CI build.

We were using std::filesystem::file_time_type when we should have been using fs::file_time_type. These types are the same on some platforms, but not on others.

Describe the solution

Switch to the correct type.

Describe alternatives you've considered

None.

Testing

I verified it still builds on Linux, but I can't test on OS X. I'm not sure even CI will test this properly. We might have to just merge and hope the release builds do better.

Additional context

We were using std::filesystem::file_time_type when we should have been
using fs::file_time_type.  These types are the same on some platforms,
but not on others.
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Mar 16, 2023
@BrettDong
Copy link
Member

The reason why it compiled on CI but failed on release build is because the target macOS version in CI build is 10.15 but it's 10.12 in release build.

ghc file system library delegates to std library on macOS >= 10.15, and uses its own implementation on older systems.

@kevingranade kevingranade merged commit 39b0446 into CleverRaven:master Mar 17, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 17, 2023
@jbytheway jbytheway deleted the avoid-std-filesystem branch March 18, 2023 00:48
jbytheway added a commit to jbytheway/Cataclysm-DDA that referenced this pull request Mar 18, 2023
To avoid bugs appearing in release builds that were not detected on CI,
update the CI build script to use the same OSX_MIN value as release
builds.

See for example CleverRaven#64314 which was such an issue.
kevingranade pushed a commit that referenced this pull request Mar 19, 2023
To avoid bugs appearing in release builds that were not detected on CI,
update the CI build script to use the same OSX_MIN value as release
builds.

See for example #64314 which was such an issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants