setClassMetadata ctorParams emits a type for type-only annotations — should be undefined
Mantenedores costumam responder em até 1 dia
Um pull request relacionado já foi integrado.
- #564 de @Brooooooklyn — integrado
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- angular, rust, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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).
- Linguagem predominante
- Rust
- Estrelas
- 232
- Forks
- 21
- Merge médio
- 1d 16h
- PRs com merge (30d)
- 62
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de voidzero-dev/oxc-angular-compiler
-
fix(directive): input names with lone surrogates are emitted in oxc's internal U+FFFD encodingAbertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 68/100
voidzero-dev/oxc-angular-compiler#505 ·
Mantenedores costumam responder em até 1 dia
-
bug rust
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 56/100
voidzero-dev/oxc-angular-compiler#313 ·
Mantenedores costumam responder em até 1 dia
-
Support useDefineForClassFields: false (Class Field Lowering)Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
voidzero-dev/oxc-angular-compiler#73 · 11 comentários ·
Mantenedores costumam responder em até 1 dia
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR runtime parity regressions (RouterLinkActive, Forms DI, Apollo DI) require app-level shimsTalvez livre de novo @Brooooooklyn assumiu há 219 dias e não há nenhum pull request aberto. Aberta
voidzero-dev/oxc-angular-compiler#61 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR: AngularNodeAppEngine is unusable (missing app-engine manifest)Talvez livre de novo @Brooooooklyn assumiu há 219 dias e não há nenhum pull request aberto. Aberta
voidzero-dev/oxc-angular-compiler#60 · 4 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de voidzero-dev/oxc-angular-compiler
Issues semelhantes
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked filesAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
maniator/verticopolis#880 ·
Mantenedores costumam responder em até 1 dia
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 3 dias
-
defect
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 2 dias