[Feature request] Optimization: Link packages based on static analyzation of source code

Đang mở
#3,210 0 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

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ính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
build-system

Hướng nghiên cứu

Start by running scriptc build ./nm_scriptc.ts --print=native-link-info and inspect which object files are linked despite appearing unused. The issue proposes several possible approaches but does not choose one or define completion criteria; first determine how the compiler currently selects native object files and agree on the intended behavior before implementation.

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

Mô tả

Looking at the result of scriptc build ./nm_scriptc.ts --print=native-link-info I don't think the source code uses scr_crypto_async.o, scr_child.o, scr_json.o, scr_url.o, scr_ffi.o.

A. The compiler can automatically remove linked object files not used in the source code. That would include omitting error codes and such for object code (string nm_scriptc) not used in the emitted executable, per static analysis.

B. The compiler can start with a blank canvas and link object files that are necessary to complete the instructions in the source code.

C. Other approaches.

Ngôn ngữ chính
TypeScript
Star
6.5k
Fork
212
Merge trung bình
13 giờ 2 phút
Pull request đã merge (30 ngày)
798

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 vercel-labs/scriptc

Tất cả issue của vercel-labs/scriptc

Issue tương tự

Thêm issue về TypeScript

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.