High TypeScript checking cost from generated Zod 3 schemas
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/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ệ
- nodejs, typescript
- Lĩnh vực
- performance
Hướng nghiên cứu
Start with the reproduction: a one-line import of LazyValue and TestBackgroundLogger from braintrust, checked with yarn exec tsc --extendedDiagnostics under the given tsconfig, compared against an export {} baseline. The generated schemas live in js/src/generated_types.ts, which imports zod/v3. Done means a measured drop in type and instantiation counts while the public input and output types stay the same. The issue asks for that benchmark before any migration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Braintrust 3.37.2 adds substantial declaration-checking work from a single unused import.
Reproduction
Use Node.js 24.21.0 and an ESM project ("type": "module" in package.json). With Yarn, set nodeLinker: node-modules in .yarnrc.yml.
yarn add [email protected] [email protected]
yarn add -D [email protected] @types/[email protected] [email protected]
repro.ts:
import { LazyValue, TestBackgroundLogger } from "braintrust";
tsconfig.json:
{
"compilerOptions": {
"strict": true,
"target": "ES2023",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": ["node"],
"skipLibCheck": false,
"noEmit": true
},
"files": ["repro.ts"]
}
Run yarn exec tsc --extendedDiagnostics. For the baseline, replace the import with export {};.
Results
All checks pass. Measured deterministic counts on TS7:
| Case | Types | Instantiations |
|---|---|---|
| No Braintrust import | 64,716 | 62,345 |
| With Braintrust import | 624,895 | 1,791,353 |
No SDK calls or credentials are required. The root and braintrust/node imports load the same declarations.
Possible fix
Generated schemas import zod/v3. Zod 4 redesigned its generics to reduce compiler instantiations.
Could these schemas migrate to Zod 4 and the public declarations be regenerated? That seems like the first approach to benchmark, while preserving precise public input and output types. We have not measured an actual schema migration yet.
- Ngôn ngữ chính
- TypeScript
- Star
- 29
- Fork
- 16
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của braintrustdata/braintrust-sdk-javascript
-
typescript
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
braintrustdata/braintrust-sdk-javascript#2578 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[bot] Instrument Letta Agent SDK (87,205 weekly downloads)Có thể đã có người làm @karthiksenv đã nhận 3 ngày trước. Đang mởtypescript
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
braintrustdata/braintrust-sdk-javascript#2577 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
braintrustdata/braintrust-sdk-javascript#2527 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
braintrustdata/braintrust-sdk-javascript#2526 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
braintrustdata/braintrust-sdk-javascript#2482 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của braintrustdata/braintrust-sdk-javascript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
xdjs/MusicNerdWeb#1532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sebastian-software/ardo#352 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
@react95/core good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày
-
@shikijs/stream: `ShikiStreamTokenizer.clone()` shares its `tokensStable` array with the originalCó thể đã có người làm @xyrolle đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày