Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Avoid including time_util in time.h#1447

Closed
ghost wants to merge 1 commit into
mastercel-expr/cel-cpp:masterfrom
unknown repositoryCopy head branch name to clipboard
Closed

Avoid including time_util in time.h#1447
ghost wants to merge 1 commit into
mastercel-expr/cel-cpp:masterfrom
unknown repositoryCopy head branch name to clipboard

Conversation

@ghost

@ghost ghost commented Apr 18, 2025

Copy link
Copy Markdown

Unfortunately, due to protocolbuffers/protobuf#21301, including time_util inside of a header will cause a lot of headaches on MSVC/Windows. While that can and should be resolved separately of this, in the interim there will be a lot of people using protobuf versions without a fix for this for the foreseeable future. This leaves us with only a couple of obvious options: either inline the constants, or move the function definitions into time.cc. I chose the latter since it doesn't seem like there is likely to be a substantial performance hit for this, as these are only used in a couple of locations that don't appear to be very hot paths.

Related issue: #768

@jnthntatum

Copy link
Copy Markdown
Collaborator

would you mind rebasing and opening a new PR? I updated the cloud build config so I can test this, but it needs a new PR to trigger it.

Unfortunately, due to protocolbuffers/protobuf#21301, including time_util inside of a header will cause a lot of headaches on MSVC/Windows. While that can and should be resolved separately of this, in the interim there will be a lot of people using protobuf versions without a fix for this for the foreseeable future. This leaves us with only a couple of obvious options: either inline the constants, or move the function definitions into time.cc. I chose the latter since it doesn't seem like there is likely to be a substantial performance hit for this, as these are only used in a couple of locations that don't appear to be very hot paths.
@ghost ghost closed this May 6, 2025
@ghost

ghost commented May 6, 2025

Copy link
Copy Markdown
Author

Done. Reopened as #1485.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.