cargo: Generate a Cargo.lock if one wasn't found

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

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, rust
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách đọc plugin cargo hiện có và đặc tả được liên kết cho issue 42. Truy vết các luồng track, fetch và stage, sau đó kiểm tra các chế độ generate_lock, hành vi mặc định và trường hợp lỗi được mô tả ở đây; hoàn thành có nghĩa là việc tạo Cargo.lock và tái dựng dependency tuân theo các quy tắc đã nêu.

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

Mô tả

Spec from https://gitlab.com/BuildStream/bst-plugins-experimental/-/issues/42

Will behave like this:

  • track: Cargo.lock will be generated by the host's cargo IF (generate_lock is true) OR (generate_lock is 'if-missing' and Cargo.lock doesn't exist). If generate_lock is false and Cargo.lock doesn't exist, raise an error. Then the existing logic for tracking cargo sources will happen. The ref will now encode everything necessary to reconstruct the vendored libraries, so the generated Cargo.lock is discarded
  • fetch: The sources are fetched according to the ref, as they are now
  • stage: The sources are staged according to the ref, as they are now
  • Buildstream will default to generate_lock: false, and projects can (if they wish) globally override that default to generate_lock: if-missing to make the cargo plugin work in all scenarios. Then generate_lock: true can be used if Cargo.lock needs to be overwritten/ignored for whatever reason (i.e. a hypothetical repo that hasn't been updated in a while and Cargo.lock specifies dependencies w/ known security issues, so you want to force it to use newer libraries)
  • If a project doesn't want to grow a dependency on cargo from the host to track, it can keep generate_lock: false as the default, and then maintain its own Cargo.lock files & stage them before the cargo source:
sources:
- kind: git_tag
  url: whatever:foobar.git
- kind: local
  path: files/cargo/foobar/Cargo.lock
- kind: cargo
  generate_lock: false # <-- from project defaults
Ngôn ngữ chính
Python
Star
8
Fork
16
Merge trung bình
36 phút
Pull request đã merge (30 ngày)
2

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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.

Issue khác của apache/buildstream-plugins

Tất cả issue của apache/buildstream-plugins

Issue tương tự

Thêm issue về Python

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.