NativeScript / NativeScript/ios
Metadata generator fails to generate proper types and does not add method to runtime
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 150
- Forks
- 43
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the Objective-C declaration in the issue with the generated declaration at typings/objc!CouchbaseLite.d.ts#L1965 and the nearby andExpression entry at L1963. Trace the metadata-generator and runtime paths for this method; done means the generated type retains the and argument label and the method is available at runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, objective-c
- Domain
- mobile, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100