NativeScript / NativeScript/nativescript-cli
References of removed dependencies are not deleted from Podfile
Chưa có ai nhận issue này.
- 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ả
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.2.0
- Cross-platform modules: 6.2.0
- Android Runtime: 6.2.0
- iOS Runtime:
- Plugin(s):
Describe the bug
When a dependency is uninstalled, its reference is not deleted from Podfile in platforms and that leads to the error when trying to run the application on device.
To Reproduce
tns create myApp --jstns prepare iosnpm i tns-core-modules@6.1.0tns prepare ios- You will see the following log in the output:
[!] CocoaPods could not find compatible versions for pod "MaterialComponents/Tabs":
In snapshot (Podfile.lock):
MaterialComponents/Tabs (= 92.4.0, ~> 92.3)
In Podfile:
MaterialComponents/Tabs (~> 84.4)
MaterialComponents/Tabs (~> 92.3)
None of your spec sources contain a spec satisfying the dependencies: `MaterialComponents/Tabs (~> 92.3), MaterialComponents/Tabs (~> 84.4), MaterialComponents/Tabs (= 92.4.0, ~> 92.3)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
[!] There are duplicate dependencies on `MaterialComponents/Tabs` in `Podfile`:
- MaterialComponents/Tabs (~> 92.3)
- MaterialComponents/Tabs (~> 84.4)
and the content of Podfile is the following:
use_frameworks!
target "newPodfileIssue" do
# NativeScriptPlatformSection /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/@nativescript/core/platforms/ios/Podfile with 9.0
platform :ios, '9.0'
# End NativeScriptPlatformSection
# Begin Podfile - /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/@nativescript/core/platforms/ios/Podfile
# platform :ios, '9.0'
use_frameworks!
pod 'MaterialComponents/Tabs', '~> 92.3'
# End Podfile
# Begin Podfile - /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/tns-core-modules/platforms/ios/Podfile
# platform :ios, '9.0'
use_frameworks!
pod 'MaterialComponents/Tabs', '~> 84.4'
# End Podfile
Expected behavior
It should work and the reference to /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/@nativescript/core/platforms/ios/Podfile should be deleted from Podfile.
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.
Hướng nghiên cứu
Bắt đầu với quy trình tạo và dọn dẹp Podfile được tns prepare ios sử dụng, tập trung vào Podfile được tạo trong platforms. Tái hiện các bước gỡ cài đặt và thay đổi phiên bản từ issue, sau đó xác minh rằng các tham chiếu đến những dependency node_modules đã bị xóa không còn tồn tại và quá trình chuẩn bị không còn báo cáo các pod bị trùng lặp hoặc không tương thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, javascript
- Lĩnh vực
- 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
- 42/100