create JSON schema for slice definitions files

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
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ệ
json
Lĩnh vực
devtools, tooling

Hướng nghiên cứu

Bắt đầu bằng việc xem xét issue #176 và schema slice Chisel hiện có trong SchemaStore, sau đó so sánh schema Rockcraft với pull request gốc của nó. Xác định schema thuộc về repository và thống nhất cách format, chisel-release và phiên bản Chisel ảnh hưởng đến việc validation; công việc được xem là hoàn tất khi schema có thể được duy trì trong repository này và phù hợp để sử dụng với CI và SchemaStore.

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

Mô tả

Problem

The issue is depicted in #176. In short, we want to be able to validate new slice definitions that are being proposed, even though Chisel itself may ignore fields that are not part of the schema.

Suggested approach

Instead of making Chisel print warnings for unknown fields, the preferred approach is to create a manageable JSON schema within this repo, that can be updated alongside the code and used as a reference from the SchemaStore.

Pros:

  • the repo itself will be the source of truth and hold the explicit schema that Chisel expects within a Slice Definitions File
    • with this JSON schema, our CI can do an early validation of new slice definitions without having to run Chisel
  • adding this schema to the SchemaStore will allow contributors to have off-the-shelf validation within their IDEs
Additional considerations

When validating a slice definition, we may need to consider

  1. the format version
  2. the chisel-release
  3. the chisel version

We need to carefully think about this because adding new fields doesn't equate to bumping the format.

Examples

Similar work has already been done for Rockcraft:

Ngôn ngữ chính
Go
Star
434
Fork
74
Merge trung bình
1 ngày 30 phút
Pull request đã merge (30 ngày)
1

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có 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.

Issue khác của canonical/chisel

Tất cả issue của canonical/chisel

Issue tương tự

Thêm issue về Go

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.