René's URL Explorer Experiment


Title: optimization: true breaks transitiveCompileScopes for jit compiled components · Issue #37216 · angular/angular · GitHub

Open Graph Title: optimization: true breaks transitiveCompileScopes for jit compiled components · Issue #37216 · angular/angular

X Title: optimization: true breaks transitiveCompileScopes for jit compiled components · Issue #37216 · angular/angular

Description: 🐞 bug report Affected Package I believe This issue is caused by @angular/compiler Is this a regression? This was working on Angular version 6.1.10 Description I am trying to compile a simple component

\r\n\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n\r\nI believe This issue is caused by @angular/compiler\r\n\r\n### Is this a regression?\r\n\r\nThis was working on Angular version 6.1.10\r\n\r\n### Description\r\n\r\nI am trying to compile a simple component\r\n```\r\n \u003cform>\r\n \u003cinput type=\"text\"\r\n name=\"value\"\r\n [(ngModel)]=\"value\"> {{value}}\r\n \u003c/form>\r\n```\r\nwith some logic\r\n\u003cpre>\u003ccode>\r\nngOnInit() { setInterval(() => this.value++, 1000);\r\n\u003c/code>\u003c/pre>\r\ninside of a module\r\n\u003cpre>\u003ccode>\r\n{\r\n imports: [CommonModule, FormsModule],\r\n declarations: [RuntimeComponent],\r\n}\r\n\r\n\u003c/code>\u003c/pre>\r\non the client with JIT compiler with the help of _compiler.compileModuleAndAllComponentsSync_.\r\n\r\nwith _optimization: false_ set in _angular.json_ everything works perfectly fine: both input and interpolation are updated with every tick of setInterval and typing inside of an input also updates the value.\r\n\r\nwith _optimization: true_ ngModel directive is just lost. i.e. interpolated value updates every second, but input neither shows values nor causes updates when you type in it.\r\n\r\nI've tried to compare the compiled components and modules in optimized vs unoptimized code and here are the differenced that I've found:\r\n\r\n* RuntimeComponentModule.ɵmod.transitiveCompileScopes.compilation contains only my RuntimeComponent in optimized version versus 33 directives and 13 pipes in unoptimized one.\r\n* RuntimeComponent.ɵcmp.tView contains significantly more items in unoptimized version\r\n\r\nIn our app far more complex components are compiled, this is just a simpler example with a reproducable issue. At the moment any workarounds would be useful.\r\n\r\nNote: you can notice\r\n\u003cpre>\u003ccode>\r\nimport { publishFacade } from '@angular/compiler';\r\npublishFacade(window);\r\n\u003c/code>\u003c/pre>\r\nin the code. Without this piece compiler is eliminated from the bundle, but this bothers us much less as it could be workarounded\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nit is impossible to reproduce on a stackblitz.\r\nHere is a repository with minimal reproduction example described above\r\nhttps://github.com/AndreyAusianik/ivy-dynamic-problem/\r\n\r\n\r\n## 🔥 Exception or Error\r\n\r\nerror can be generated if you add something specific to directives to the template. for example \r\n*#model=\"ngModel\"* then it won't be rendered at all, as the compiler finds nothing exported as ngModel.\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 9.1.5\r\nNode: 13.1.0\r\nOS: win32 x64\r\n\r\nAngular: 9.1.6\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.901.5\r\n@angular-devkit/build-angular 0.901.5\r\n@angular-devkit/build-optimizer 0.901.5\r\n@angular-devkit/build-webpack 0.901.5\r\n@angular-devkit/core 9.1.5\r\n@angular-devkit/schematics 9.1.5\r\n@angular/cli 9.1.5\r\n@ngtools/webpack 9.1.5\r\n@schematics/angular 9.1.5\r\n@schematics/update 0.901.5\r\nrxjs 6.5.5\r\ntypescript 3.8.3\r\nwebpack 4.42.0\r\n\r\n\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/AndreyAusianik","@type":"Person","name":"AndreyAusianik"},"datePublished":"2020-05-20T08:52:18Z","url":"https://github.com/angular/angular/issues/37216"}
react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:46a51b02-3b40-ee8a-80ef-84415524fff0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id894C:1EC9BC:C516F2:FC47AA:6B00FFA2
html-safe-noncec5bb6809f57be8f3aeabbb3cb687f9c437cbc0580780b268b1d88dd92f5de251
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTRDOjFFQzlCQzpDNTE2RjI6RkM0N0FBOjZCMDBGRkEyIiwidmlzaXRvcl9pZCI6IjQwNjQ1Nzc0MzA5MDIzNDE1MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9f794a1aa5ce4988034b78618365130d16138564375ad50bcfc9c73f265ff383
hovercard-subject-tagissue:621582796
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/37216/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b34aad80a11033180827dab38139c39a522fab0f8fb11953dc3108411cacf46f/angular/angular/issues/37216
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b34aad80a11033180827dab38139c39a522fab0f8fb11953dc3108411cacf46f/angular/angular/issues/37216
og:image:alt🐞 bug report Affected Package I believe This issue is caused by @angular/compiler Is this a regression? This was working on Angular version 6.1.10 Description I am trying to compile a simple compon...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndreyAusianik
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/37216#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F37216
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F37216
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/37216
Reloadhttps://github.com/angular/angular/issues/37216
Reloadhttps://github.com/angular/angular/issues/37216
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/37216
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/37216
optimization: true breaks transitiveCompileScopes for jit compiled componentshttps://github.com/angular/angular/issues/37216#top
area: compilerIssues related to `ngc`, Angular's template compilerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20compiler%22
type: use-casehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20use-case%22
Backloghttps://github.com/angular/angular/milestone/82
https://github.com/AndreyAusianik
AndreyAusianikhttps://github.com/AndreyAusianik
on May 20, 2020https://github.com/angular/angular/issues/37216#issue-621582796
https://github.com/AndreyAusianik/ivy-dynamic-problem/https://github.com/AndreyAusianik/ivy-dynamic-problem/
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
area: compilerIssues related to `ngc`, Angular's template compilerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20compiler%22
on May 20, 2020https://github.com/angular/angular/issues/37216#event-3355490689
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on May 20, 2020https://github.com/angular/angular/issues/37216#event-3355490767
https://github.com/JoostK
JoostKhttps://github.com/JoostK
on May 20, 2020https://github.com/angular/angular/issues/37216#issuecomment-631410322
#36255https://github.com/angular/angular/issues/36255
https://github.com/AndreyAusianik
AndreyAusianikhttps://github.com/AndreyAusianik
on May 20, 2020https://github.com/angular/angular/issues/37216#issuecomment-631418321
#36255https://github.com/angular/angular/issues/36255
https://github.com/AndreyAusianik
AndreyAusianikhttps://github.com/AndreyAusianik
on May 22, 2020https://github.com/angular/angular/issues/37216#issuecomment-632862317
https://github.com/delagen
delagenhttps://github.com/delagen
on May 25, 2020https://github.com/angular/angular/issues/37216#issuecomment-633647449
alxhubhttps://github.com/alxhub
triage #1https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22triage%20%231%22
type: use-casehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20use-case%22
on May 26, 2020https://github.com/angular/angular/issues/37216#event-3374846082
https://github.com/alxhub
alxhubhttps://github.com/alxhub
on May 26, 2020https://github.com/angular/angular/issues/37216#issuecomment-634203283
@AndreyAusianikhttps://github.com/AndreyAusianik
alxhubhttps://github.com/alxhub
engine: ivyhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22engine%3A%20ivy%22
on May 26, 2020https://github.com/angular/angular/issues/37216#event-3374873310
https://github.com/AndreyAusianik
AndreyAusianikhttps://github.com/AndreyAusianik
on May 28, 2020https://github.com/angular/angular/issues/37216#issuecomment-635157767
@alxhubhttps://github.com/alxhub
petebacondarwinhttps://github.com/petebacondarwin
state: WIPhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20WIP%22
on Sep 22, 2020https://github.com/angular/angular/issues/37216#event-3791878819
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
Backloghttps://github.com/angular/angular/milestone/82
on Sep 22, 2020https://github.com/angular/angular/issues/37216#event-3791878876
petebacondarwinhttps://github.com/petebacondarwin
state: WIPhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20WIP%22
on Sep 22, 2020https://github.com/angular/angular/issues/37216#event-3791881335
https://github.com/volante007
volante007https://github.com/volante007
on Oct 15, 2020https://github.com/angular/angular/issues/37216#issuecomment-708976721
@AndreyAusianikhttps://github.com/AndreyAusianik
https://github.com/alan-agius4
alan-agius4https://github.com/alan-agius4
on Nov 10, 2020https://github.com/angular/angular/issues/37216#issuecomment-724534890
#39624https://github.com/angular/angular/issues/39624
alan-agius4https://github.com/alan-agius4
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 10, 2020https://github.com/angular/angular/issues/37216#event-3977543665
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Dec 11, 2020https://github.com/angular/angular/issues/37216#issuecomment-743295065
automatic conversation locking policyhttps://github.com/angular/angular/blob/8f24bc9443b3872fe095d9f7f77b308a361a13b4/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Dec 11, 2020https://github.com/angular/angular/issues/37216#event-4101237037
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/37216
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/37216
area: compilerIssues related to `ngc`, Angular's template compilerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20compiler%22
type: use-casehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20use-case%22
BacklogNo due datehttps://github.com/angular/angular/milestone/82
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.