-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSC — Explicitly mark AOT incompatible targets via 'jit:true' #6886
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't compile? The docs reference jit
as being a valid property property of @Component
but I'm guessing that it requires the component to be standalone
(which would require a large overhaul to our project).
Can you instead try adding the property to the related Module
s?
Thanks ! Seems like adding the jit to Module actually passed the checks |
…flow#6886) ## Motivation for features / changes This PR is for the LSC that will add `jit: true` to all `@Directive`, `@Component` and `@NgModule` classes that are not AOT compatible. Commonly in Google3, TypeScript test files are part of a `ts_library` or a `ng_module w/ testonly=True`. These targets simply run the TypeScript compiler from Microsoft, without any specific Angular processing. This allows code to exist that isn't necessarily compatible with Angular's compiler that strictly checks e.g. components This LSC adds `jit: true` to those components to clearly indicate that those components are not processed by the Angular compiler. This is a no-op because the Angular compiler doesn't even run on these files (as said above). In the future, we would like to change this, and need clear indication of what is incompatible or not. This is what the `jit: true` flag does. The `jit: true` flag basically tells the Angular compiler to ignore these components, so that their behavior is unchanged and everything continues to work like before.
## Motivation for features / changes This PR is for the LSC that will add `jit: true` to all `@Directive`, `@Component` and `@NgModule` classes that are not AOT compatible. Commonly in Google3, TypeScript test files are part of a `ts_library` or a `ng_module w/ testonly=True`. These targets simply run the TypeScript compiler from Microsoft, without any specific Angular processing. This allows code to exist that isn't necessarily compatible with Angular's compiler that strictly checks e.g. components This LSC adds `jit: true` to those components to clearly indicate that those components are not processed by the Angular compiler. This is a no-op because the Angular compiler doesn't even run on these files (as said above). In the future, we would like to change this, and need clear indication of what is incompatible or not. This is what the `jit: true` flag does. The `jit: true` flag basically tells the Angular compiler to ignore these components, so that their behavior is unchanged and everything continues to work like before.
Motivation for features / changes
This PR is for the LSC that will add
jit: true
to all@Directive
,@Component
and@NgModule
classes that are not AOT compatible.Commonly in Google3, TypeScript test files are part of a
ts_library
or ang_module w/ testonly=True
. These targets simply run the TypeScript compiler from Microsoft, without any specific Angular processing. This allows code to exist that isn't necessarily compatible with Angular's compiler that strictly checks e.g. componentsThis LSC adds
jit: true
to those components to clearly indicate that those components are not processed by the Angular compiler. This is a no-op because the Angular compiler doesn't even run on these files (as said above). In the future, we would like to change this, and need clear indication of what is incompatible or not. This is what thejit: true
flag does. Thejit: true
flag basically tells the Angular compiler to ignore these components, so that their behavior is unchanged and everything continues to work like before.