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

value_lexicon: Fix build with abseil LTS 2023-08-02 #334

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

acelyc111
Copy link
Contributor

@acelyc111 acelyc111 commented Nov 22, 2023

Fix the build error like:

In file included from /usr/local/include/absl/hash/hash.h:85,
                 from /home/xxx/dev/s2geometry/src/s2/s2point.h:24,
                 from /home/xxx/dev/s2geometry/src/s2/value_lexicon_test.cc:28:
/usr/local/include/absl/hash/internal/hash.h:247:23: error: reference to 'hash_internal' is ambiguous
  247 |   using is_hashable = absl::hash_internal::is_hashable<T>;
      |                       ^~~~
In file included from /usr/local/include/absl/hash/internal/hash.h:49,
                 from /usr/local/include/absl/hash/hash.h:85,
                 from /home/xxx/dev/s2geometry/src/s2/s2point.h:24,
                 from /home/xxx/dev/s2geometry/src/s2/value_lexicon_test.cc:28:
/usr/local/include/absl/hash/internal/city.h:57:11: note: candidates are: 'namespace absl::lts_20230802::hash_internal { }'
   57 | namespace hash_internal {
      |           ^~~~~~~~~~~~~
In file included from /home/xxx/dev/s2geometry/src/s2/value_lexicon_test.cc:18:
/home/xxx/dev/s2geometry/src/s2/value_lexicon.h:33:11: note:                 'namespace absl::hash_internal { }'
   33 | namespace hash_internal {
      |           ^~~~~~~~~~~~~

Because absl::hash_internal::Hash is not used in this file, it's safe to remove it.

namespace absl {
namespace hash_internal {
template <typename T>
struct Hash;
Copy link
Member

Choose a reason for hiding this comment

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

I'm sure this was added because something was failing, but it's obviously wrong and we shouldn't be depending on abseil internals. I guess we can play whack-a-bug.

@jmr jmr changed the title Fix build with abseil value_lexicon: Fix build with abseil LTS 2023-08-02 Nov 22, 2023
@jmr jmr merged commit 30f7072 into google:master Nov 22, 2023
1 check passed
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.

None yet

2 participants