feat: honor `jit: true` in `@Component` / `@Directive` / `@NgModule` (skip AOT compile)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 52/100
Direção de pesquisa
Start by tracing the existing JIT downlevel path exposed by TransformOptions::jit, then compare it with the AOT handling for @Component, @Directive, and @NgModule. The issue points to ngtsc's extractDirectiveMetadata and the directive, component, and ng_module handlers as behavioral references. Done means jit: true preserves the decorator for runtime JIT, emits no Ivy .d.ts members for that class, and leaves the rest of the file AOT-compiled.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
jit: true in decorator metadata tells ngtsc not to compile the class ahead of time. ngtsc leaves the decorator in place (it is downleveled by TS) so the JIT compiler handles it at runtime. OXC ignores the flag and compiles the class AOT anyway.
Repro
import {Component} from '@angular/core';
@Component({jit: true, selector: 'c', template: '<div>{{x}}</div>'})
export class C { x = 1; }
OXC (main and #504 tip)
export class C { x = 1;
static ɵfac = function C_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || C)(); };
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({type:C,selectors:[["c"]],decls:2,vars:1,template:function C_Template(rf, ctx) {...},encapsulation:2});
}
// + ɵsetClassDebugInfo, ɵsetClassMetadata(C,[{type:Component,args:[{jit:true,selector:"c",template:"<div>{{x}}</div>"}]}],null,null)
.d.ts: ɵfac + ɵcmp declarations.
ngtsc 22.1.7
let C = class C {
x = 1;
};
C = __decorate([
Component({ jit: true, selector: 'c', template: '<div>{{x}}</div>' })
], C);
.d.ts: only x: number; (no Ivy fields).
@Directive({jit: true, ...}) and @NgModule({jit: true}) behave the same way: ngtsc leaves the decorator, OXC emits ɵdir / ɵmod.
ngtsc source (v22.0.0)
annotations/directive/src/shared.tsextractDirectiveMetadata:if (directive.has('jit')) return {jitForced: true};annotations/directive/src/handler.tsandannotations/component/src/handler.ts: onjitForced, register for JIT and skip analysis.annotations/ng_module/src/handler.ts:if (ngModule.has('jit')) ...
On main?
Yes.
Direction
When the decorator has jit: true, run that class through the existing JIT downlevel path (TransformOptions::jit) instead of AOT, and emit no Ivy .d.ts members for it. The rest of the file is still compiled AOT.
- Linguagem predominante
- Rust
- Estrelas
- 235
- Forks
- 21
- Merge médio
- 1d 15h
- PRs com merge (30d)
- 65
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á 224 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á 224 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
-
rustix::termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOSAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
bytecodealliance/rustix#1706 · 1 comentário ·
Mantenedores costumam responder em até 11 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
wormhole-foundation/wormhole#5062 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
RUSTSEC-2026-0348: Brotli certificate decompression can allocate up to 1 GiB before authenticationAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100