Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

versioned: Adjust action arguments

Đã đóng
#1,310 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Techassi đang làm issue này rồi.

Từ ngày 23/10/2026.

Đá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
52/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
developer-experience

Hướng nghiên cứu

Start by reading the crate that parses and applies the versioned attribute arguments, then check its tests and examples for since and from_ usage. The issue proposes renaming these to in and prev_ or previous_, but leaves the preferred prefix open. Done means the argument names are updated consistently and the proposed prev_docs use for deprecated actions is supported.

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

Mô tả

Current state

Currently, all actions use the since argument to specify since which version a particular change was introduced. Additionally, all arguments describing previous facts, like the item name, the item type, and the item docs use the from_ prefix.

struct Foo {
    #[versioned(changed(
        since = "...",
        from_name = "...",
        from_type = "...",
        from_docs = "..."
    ))]
    bar: bool,
}

Initially, this made sense to use both these terms, because e.g. a field's name changed from foo to bar. As such, the argument name from_name makes sense. We recently noticed that both terms are not ideal, especially the combination #[versioned(changed(since = "...", from_docs = "..."))].

Suggestion

I suggest renaming these arguments in the following fashion:

  • since -> in. This maps well for all actions and in which version a particular change happened:
    • "added in ..."
    • "changed in ..."
    • "deprecated in ..."
  • from_ -> prev_ or previous_. This better expresses what the fact's value was previously:
    • "the previous name was ..."
    • "the previous type was ..."
    • "the previous docs were ..."
struct Foo {
    #[versioned(changed(
        in = "...",
        prev_name = "...",
        prev_type = "...",
        prev_docs = "..."
    ))]
    bar: bool,
}

This change also enables us to add support for from_docs/prev_docs to deprecated action for example. prev_docs just makes way more sense in this context.

Ngôn ngữ chính
Rust
Star
169
Fork
20
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

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 stackabletech/operator-rs

Tất cả issue của stackabletech/operator-rs

Issue tương tự

Thêm issue về Rust

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.