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

Separate the compiler and the lib source code

Đang mở
#648 1 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
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Issue không nêu tên tệp, bài kiểm thử hay điểm vào nào. Hãy bắt đầu bằng việc lập bản đồ nơi mã nguồn của compiler và thư viện, việc đóng gói, các dependency và các ràng buộc về phiên bản Python được định nghĩa; sau đó xác định cách phân phối chúng dưới dạng các môi trường riêng biệt. Hoàn thành có nghĩa là người dùng compiler cần các dependency của compiler, trong khi người dùng thư viện có thể cài đặt và sử dụng thư viện một cách độc lập, đồng thời duy trì các khác biệt về khả năng tương thích đã nêu.

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

Mô tả

enhancement

The Problem

Currently, the code of betterproto's compiler and betterproto's lib are together, in the same repo, same Python environment, etc.

This has several disadvantages:

  • The users of already compiled files will still need the source code of betterproto's compiler, even if they will never run it
  • If changes are made only on the compiler, all users will be affected and will need to update betterproto even if they are not concerned by the update.
  • These two parts of betterproto don't have the same requirements concerning the Python version: we need to support old versions in the library since users may need them... But we should be able to use the latest Python version in the compiler to make the development easier (the users won't be impacted).
  • In the same spirit, the compiler part is an application (we can choose the version of the dependencies we rely on), while the lib is a library which should support a wide range of versions for its dependencies.
  • The dependencies needed by the compiler are marked as optional to avoid forcing all the users to download them... But it means that these packages may not be installed when using the compiler. For now, an ad-hoc error message is shown, and the users need to manually install the dependencies.

The Ideal Solution

I think it would be better to split the source code in two parts: the compiler and the library. These two parts would have different Python environment.

Note

This change has a very low priority, but I think it would be a nice improvement. If we do it, it should be done before v2. I can realize the change later... I'll take about it on Discord soon

Ngôn ngữ chính
Python
Star
1.8k
Fork
235
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 danielgtaylor/python-betterproto

Tất cả issue của danielgtaylor/python-betterproto

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.