NativeScript / NativeScript/ios
Metadata generator fails to generate proper types and does not add method to runtime
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 150
- 派生
- 43
- 平均合并
- 3 天 10 小时
- 30 天内合并 PR
- 22
描述
Since always, we are facing a small problem in couchbase plugin API. There is a certain method that is not parsed properly by metadata generator for a strange reason.
This is the definition of method in obj-c:
#pragma mark - Aggregate operators:
/**
Creates a between expression that evaluates whether or not the current expression is
between the given expressions inclusively.
@param expression1 The inclusive lower bound expression.
@param expression2 The inclusive upper bound expression.
@return The between expression.
*/
- (CBLQueryExpression*) between: (CBLQueryExpression*)expression1 and: (CBLQueryExpression*)expression2;
This is the typing that generator creates: https://github.com/triniwiz/nativescript-plugins/blob/master/packages/nativescript-couchbase/typings/objc!CouchbaseLite.d.ts#L1965
You'll notice it's missing and argument label.
Also, this method doesn't exist in runtime at all even if one tries to call between or betweenAnd.
There is also a valid method that happens to be named andExpression and I'm wondering if generator gets confused:
https://github.com/triniwiz/nativescript-plugins/blob/master/packages/nativescript-couchbase/typings/objc!CouchbaseLite.d.ts#L1963
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
将 issue 中的 Objective-C 声明与 typings/objc!CouchbaseLite.d.ts#L1965 处生成的声明以及 L1963 处附近的 andExpression 条目进行比较。跟踪此方法的 metadata-generator 和 runtime 路径;完成的标准是生成的类型保留 and 参数标签,并且该方法在 runtime 中可用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, objective-c
- 领域
- mobile, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100