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

Enum type template arguments do not match #297

Open
JakeHillion opened this issue Aug 18, 2023 · 0 comments
Open

Enum type template arguments do not match #297

JakeHillion opened this issue Aug 18, 2023 · 0 comments
Labels
bug Something isn't working codegen Code Generation Framework help wanted Extra attention is needed

Comments

@JakeHillion
Copy link
Contributor

TreeBuilder V2 codegen automatically generates the declarations for traversal functions. For example:

template <typename DB, uint64_t N0, IssetBitsetOption_3 N1>
struct TypeHandler<DB, apache::thrift::detail::isset_bitset<N0, N1>> {
...

However, IssetBitsetOption_3 is the generated OI type and does not match the N1 type of the container. This results in:

oil_jit_code.cpp:364:65: error: value of type 'OIInternal::(anonymous namespace)::IssetBitsetOption_3' (aka 'unsigned int') is not implicitly convertible to 'apache::thrift::detail::IssetBitsetOption'
struct TypeHandler<DB, apache::thrift::detail::isset_bitset<N0, N1>> {
                                                                ^~
1 error generated.

It's possible that apache::thrift::detail::isset_bitset should be a pass through type, so if it's the only one affected then that change could be a solution. Else we might need something fancy to reinterpret our generated type as the underlying type.

Examples:

  • OilIntegration.thrift_namespaces_a
@JakeHillion JakeHillion added bug Something isn't working help wanted Extra attention is needed codegen Code Generation Framework labels Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codegen Code Generation Framework help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant