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

feat: Throw invalid_time_zone exception from tzdb [4/4] #12475

Closed

Conversation

kevinwilfong
Copy link
Contributor

@kevinwilfong kevinwilfong commented Feb 27, 2025

Summary:
https://github.com/facebookincubator/velox/pull/10654 introduced an invalid_timezone exception
to the date library we pulled in. This PR makes an analogous change to the time zone library we
pulled in from LLVM. It also restores code/tests that were disabled because this exception was
missing.

Differential Revision: D70344546

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 27, 2025
Copy link

netlify bot commented Feb 27, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 1016752
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67cf2cb70e584f0008f2c412

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70344546

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70344546

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 27, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70344546

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 28, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70344546

kevinwilfong pushed a commit to kevinwilfong/velox that referenced this pull request Feb 28, 2025
Copy link
Collaborator

@assignUser assignUser left a comment

Choose a reason for hiding this comment

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

There is a bit of an inconsistent use of our custom cmake functions here. They are poorly documented, so it's on me ^^

The difference can only be seen when building with VELOX_MONO_LIBRARY=ON otherwise velox_add_library etc. are transparent wrappers around add_library etc..

When VELOX_MONO_LIBRARY=ON is set velox_add_library combines the sources and includes of all targets created with it into one libvelox.a . So we only want to use velox_add_library for targets that we want to be part of the main velox library itself, which means we don't want to use it for fuzzer, benchmarks, tests and other dev/test utils.

For the stuff in external it depends on if they are velox build time deps and the user can build against libvelox.a without them, then they can just be static external targets which the linker pulls the symbols from we need -> good for binary size.

If symbols from these libraries are included in out public api we will need to install these external targets to the user system, in that case making them part of libvelox might be a convenient shortcut for now. (maybe needs munging of symbols though to avoid clashes but that's not this PR).

Please choose one approach and use it consistently as mixing normal targets with velox_* functions leads to weird results.

velox_include_directories(velox_external_date SYSTEM PUBLIC velox/external)
velox_compile_definitions(velox_external_date PRIVATE USE_OS_TZDB)
add_library(velox_external_date INTERFACE)
velox_include_directories(velox_external_date INTERFACE velox/external/date)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
velox_include_directories(velox_external_date INTERFACE velox/external/date)
target_include_directories(velox_external_date INTERFACE velox/external/date)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the explanation, I'll update #12422 with your suggestion.

Copy link
Contributor

@yuandagits yuandagits left a comment

Choose a reason for hiding this comment

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

left very minor in phab, thank you!

…bator#12475)

Summary:
Pull Request resolved: facebookincubator#12475

facebookincubator#10654 introduced an invalid_timezone exception
to the date library we pulled in.  This PR makes an analogous change to the time zone library we
pulled in from LLVM.  It also restores code/tests that were disabled because this exception was
missing.

Reviewed By: yuandagits

Differential Revision: D70344546
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70344546

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b12d69f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants