NativeScript / NativeScript/nativescript-cli

Removing plugin which has dependencies with native code won't clean the platform

Đang mở
#2,638 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.

bug os: android
Ngôn ngữ chính
JavaScript
Star
1.1k
Fork
204
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
8

Mô tả

Problem:

Installing a plugin, which depends on other plugins with native dependencies will not trigger a platform clean (especially necessary when building for android) when removed.
Suppose we have tns-core-modules, which is purely javascript. It depends on tns-core-modules-widgets which comprises of native android and iOS plugins.
tns-core-modules
'--tns-core-modules-widgets

Versions:
CLI: 2.5
Android runtime: 2.5/3.0
modules: any version
Steps to reproduce:

tns create myTestApp
cd myTestApp
tns build android <- at this point tns-core-modules are added as a dependency
The build process will generate build artifacts with the specific version of its native dependencies (tns-core-modules-widgets) This can be verified by finding tns-core-modules-widgets inside the 'platforms/android/configurations' dir.
tns plugin remove tns-core-modules <- will not trigger gradle clean - https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/android-project-service.ts#L377

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

Bắt đầu với lib/services/android-project-service.ts quanh dòng 377 và tái hiện các bước build Android và xóa plugin được liệt kê. Kiểm tra platforms/android/configurations trước và sau khi xóa tns-core-modules; hoàn tất khi việc xóa kích hoạt platform clean, sodass các artifact của dependency native không còn được giữ lại.

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

Đánh giá

Công nghệ
android, javascript
Lĩnh vực
build-system, cli, mobile
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
48/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.