setClassMetadata ctorParams emits a type for type-only annotations — should be undefined
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #564 của @Brooooooklyn — đã merge
Đá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
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- angular, rust, typescript
Hướng nghiên cứu
Start in ngtsc/annotations/common/src/metadata.ts, especially ctorParameterToMetadata, and compare how it handles unavailable type-value references with OXC’s setClassMetadata output. Run the named class-metadata and full-file fixtures and their comparison tests. Done means type-only annotations emit type: undefined, while value-space symbols still emit their type, and the listed fixtures no longer differ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found via #561 (live setClassMetadata comparison in e2e/compare).
For a constructor param whose type annotation is type-only — an interface, type alias, or type parameter — ngtsc emits type: undefined in setClassMetadata ctorParams (ctorParameterToMetadata in ngtsc/annotations/common/src/metadata.ts emits LiteralExpr(undefined) when param.typeValueReference.kind === TypeValueReferenceKind.UNAVAILABLE).
OXC emits the annotation's name regardless:
import { Injectable, Inject, InjectionToken } from '@angular/core';
interface ApiConfig { baseUrl: string }
export const API_CONFIG = new InjectionToken<ApiConfig>('apiConfig');
@Injectable({ providedIn: 'root' })
export class TestableService {
constructor(@Inject(API_CONFIG) private apiConfig: ApiConfig) {}
}
OXC emits ctorParams: () => [{ type: ApiConfig, decorators: [...] }] — ApiConfig is an interface, erased at compile time, so evaluating the thunk throws ReferenceError. ngtsc emits type: undefined.
Fix: the ctorParams metadata builder should only emit type: when the annotation names a value-space symbol (class, enum, imported value binding); otherwise undefined. Fixtures currently surfacing this: class-metadata/class-metadata-injectable, class-metadata/class-metadata-with-inject, full-file/component-with-services (declared as known differences until this is fixed).
- Ngôn ngữ chính
- Rust
- Star
- 232
- Fork
- 21
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 62
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 voidzero-dev/oxc-angular-compiler
-
fix(directive): input names with lone surrogates are emitted in oxc's internal U+FFFD encodingĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
voidzero-dev/oxc-angular-compiler#505 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug rust
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
voidzero-dev/oxc-angular-compiler#313 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support useDefineForClassFields: false (Class Field Lowering)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
voidzero-dev/oxc-angular-compiler#73 · 11 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR runtime parity regressions (RouterLinkActive, Forms DI, Apollo DI) require app-level shimsCó thể làm lại được @Brooooooklyn đã nhận 219 ngày trước và không có pull request nào đang mở. Đang mở
voidzero-dev/oxc-angular-compiler#61 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR: AngularNodeAppEngine is unusable (missing app-engine manifest)Có thể làm lại được @Brooooooklyn đã nhận 219 ngày trước và không có pull request nào đang mở. Đang mở
voidzero-dev/oxc-angular-compiler#60 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/oxc-angular-compiler
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
element-hq/lk-jwt-service#248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged bug bughunt pm:pipenv priority:p1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SocketDev/socket-patch#1219 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pact-foundation/pact-cli#154 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
antithesishq/bombadil#361 ·
Maintainer thường phản hồi trong vòng 1 ngày