Skip to content
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

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

qihach64
Copy link
Contributor

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.

Copy link
Contributor

@rileyajones rileyajones left a 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 Modules?

@qihach64
Copy link
Contributor Author

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 Modules?

Thanks ! Seems like adding the jit to Module actually passed the checks

@qihach64 qihach64 merged commit 32e9e95 into tensorflow:master Jul 26, 2024
13 checks passed
groszewn pushed a commit to groszewn/tensorboard that referenced this pull request Aug 13, 2024
…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.
groszewn pushed a commit that referenced this pull request Aug 13, 2024
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants