Android napi (quickjs-ng): assigning to a Java/Kotlin bean property does not call the setter
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 47/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, javascript, kotlin
Hướng nghiên cứu
Start by tracing how @nativescript/android-quickjs-ng exposes Kotlin bean properties and handles JavaScript property assignment; the issue names no source files or tests. Compare assignment to handler.enabled with the working handler.setEnabled(false) call, then check whether nullable object properties behave the same way. Done means assignment invokes the native setter and updates the value; the report says other napi engines are untested.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: @nativescript/android-quickjs-ng 9.0.0-alpha.5 (also seen with 9.1.0-alpha.0). The previous V8 runtime (@akylas/nativescript-android-runtime 8.9.2) called the setter.
Kotlin class:
class AutoScanHandler(...) {
var enabled: Boolean = true
set(value) { field = value; Log.d(TAG, "set enabled:$value") }
}
JS:
const handler = new com.akylas.documentscanner.AutoScanHandler(context, cropView, callback);
typeof handler.enabled; // "boolean"
typeof handler.setEnabled; // "function"
handler.enabled = false; // no error, no "set enabled" log
handler.enabled; // still true
handler.setEnabled(false); // works
Object.getOwnPropertyNames(Object.getPrototypeOf(handler)) lists both setEnabled and enabled, so the accessor is defined, but assignment does not reach the native setter. Same for a Kotlin property with a nullable object type: processor.autoScanHandler = handler reads back null. Reads work.
Impact: silent failure, no exception. It broke auto capture in a released app (https://github.com/ossappscollective/OSS-DocumentScanner/issues/740).
Not tested on the other napi engines (V8/Hermes/JSC).
- Ngôn ngữ chính
- C++
- Star
- 27
- Fork
- 4
- Merge trung bình
- 16 giờ 48 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/runtimes
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NativeScript/runtimes#100 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
NativeScript/runtimes#99 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
NativeScript/runtimes#98 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 53/100
NativeScript/runtimes#97 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NativeScript/runtimes#94 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NativeScript/runtimes
Issue tương tự
-
good first issue invalid
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
DanielJerolm/gpcc#74 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
patrick-hudson/put.gd-desktop#808 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DPI change is not fully handled in the cascading window on WindowsCó thể đã có người làm @yukawa đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement Ready for final check
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
mpogue2/SquareDesk#1818 · 1 bình luận ·