NativeScript / NativeScript/ios

Metadata generator fails to generate proper types and does not add method to runtime

Đang mở
#201 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
JavaScript
Star
150
Fork
43
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
22

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

So sánh khai báo Objective-C trong issue với khai báo được tạo tại typings/objc!CouchbaseLite.d.ts#L1965 và mục andExpression gần đó tại L1963. Truy vết các đường dẫn metadata-generator và runtime cho phương thức này; hoàn tất có nghĩa là kiểu được tạo vẫn giữ nhãn đối số and và phương thức khả dụng tại runtime.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, objective-c
Lĩnh vực
mobile, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.