alibaba / alibaba/fastFFI

@CXXSuperTemplate doens't work if the super class is placed in another file

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
127
Forks
14
PR merge metrics
No merged PRs in 30d

Description

For class

```java
@FFITypeAlias("arrow::Result")
@FFIGen(templates = @CXXTemplate(cxx = "int", java = "Integer"))
@CXXSuperTemplate(
type = "arrow.EqualityComparable",
template = @CXXTemplate(java = "arrow.Result", cxx = "arrow::Result")
)
@CXXHead(
system = "arrow/result.h"
)
public interface Result extends EqualityComparable>, CXXPointer {
}
```

and class

```java
@FFITypeAlias("arrow::util::EqualityComparable")
@FFIGen
@CXXHead(
system = "arrow/util/compare.h"
)
public interface EqualityComparable extends CXXPointer
{
}
```

The `CXXSuperTemplate` doesn't work if they are placed in different java files, but works if been placed in the the file.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the example with Result and EqualityComparable in separate Java files, then trace how CXXSuperTemplate processes those two interfaces. Done means the annotation works across separate files as well as when both interfaces share one file.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.