René's URL Explorer Experiment


Title: fix(ivy): allow abstract directives to have an invalid constructor by JoostK · Pull Request #32987 · angular/angular · GitHub

Open Graph Title: fix(ivy): allow abstract directives to have an invalid constructor by JoostK · Pull Request #32987 · angular/angular

X Title: fix(ivy): allow abstract directives to have an invalid constructor by JoostK · Pull Request #32987 · angular/angular

Description: For abstract directives, i.e. directives without a selector, it may happen that their constructor is called explicitly from a subclass, hence its parameters are not required to be valid for Angular's DI purposes. Prior to this commit however, having an abstract directive with a constructor that has parameters that are not eligible for Angular's DI would produce a compilation error. A similar scenario may occur for @Injectables, where an explicit use* definition allows for the constructor to be irrelevant. For example, the situation where useFactory is specified allows for the constructor to be called explicitly with any value, so its constructor parameters are not required to be valid. For @Injectables this is handled by generating a DI factory function that throws. This commit implements the same solution for abstract directives, such that a compilation error is avoided while still producing an error at runtime if the type is instantiated implicitly by Angular's DI mechanism. Fixes #32981 TODO Adjust error message for abstract directives, it currently refers to @Injectable

Open Graph Description: For abstract directives, i.e. directives without a selector, it may happen that their constructor is called explicitly from a subclass, hence its parameters are not required to be valid for Angular...

X Description: For abstract directives, i.e. directives without a selector, it may happen that their constructor is called explicitly from a subclass, hence its parameters are not required to be valid for Angular...

Opengraph URL: https://github.com/angular/angular/pull/32987

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:93cb953f-6c78-9437-e6ff-7287fa9d5306
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAF50:1EC9BC:1984C55:2087F53:6B014AE8
html-safe-nonceb3614c4b9fd915abba87cc09a3cbfb8799a7394db291bbf765cae864cf496939
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjUwOjFFQzlCQzoxOTg0QzU1OjIwODdGNTM6NkIwMTRBRTgiLCJ2aXNpdG9yX2lkIjoiMjcwNDY0MTc0OTYyMzU4OTYwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac59ff014ccbc0a621cc02b96f0c08122e492ce43e3f658bc5739e2c1eacb080ba
hovercard-subject-tagpull_request:324394684
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angular/pull/32987/files
twitter:imagehttps://avatars.githubusercontent.com/u/123679?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/123679?s=400&v=4
og:image:altFor abstract directives, i.e. directives without a selector, it may happen that their constructor is called explicitly from a subclass, hence its parameters are not required to be valid for Angular...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/pull/32987/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F32987%2Ffiles
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%2Fpull%2F32987%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/pull/32987/files
Reloadhttps://github.com/angular/angular/pull/32987/files
Reloadhttps://github.com/angular/angular/pull/32987/files
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues836 (836)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
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
JoostKhttps://github.com/JoostK
angular:masterhttps://github.com/angular/angular/tree/master
JoostK:ngtsc-abstract-dir-ctorhttps://github.com/JoostK/angular/tree/ngtsc-abstract-dir-ctor
Conversation 14 https://github.com/angular/angular/pull/32987
Commits 1 https://github.com/angular/angular/pull/32987/commits
Checks 0 https://github.com/angular/angular/pull/32987/checks
Files changed https://github.com/angular/angular/pull/32987/files
Please reload this pagehttps://github.com/angular/angular/pull/32987/files
fix(ivy): allow abstract directives to have an invalid constructor https://github.com/angular/angular/pull/32987/files#top
Show all changes 1 commit https://github.com/angular/angular/pull/32987/files
fc8481b fix(ivy): allow abstract directives to have an invalid constructor JoostK Oct 3, 2019 https://github.com/angular/angular/pull/32987/commits/fc8481b7700894f48d99fc228beee62bd4a66d33
Clear filters https://github.com/angular/angular/pull/32987/files
Please reload this pagehttps://github.com/angular/angular/pull/32987/files
Please reload this pagehttps://github.com/angular/angular/pull/32987/files
component.ts https://github.com/angular/angular/pull/32987/files#diff-f2bb60ef38f35f7d41b0ac0868cc4267738c5e4c78e044336aec52d86a6e2d29
directive.ts https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
factory.ts https://github.com/angular/angular/pull/32987/files#diff-80e7e9575e031811f3872eea96d6993fb5ee53afd00bf89f20540732bbfef49c
injectable.ts https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
pipe.ts https://github.com/angular/angular/pull/32987/files#diff-cca09745361bb2d9844269a54bb34dfc82c87e86ceac4f72ffe7b740634b2437
util.ts https://github.com/angular/angular/pull/32987/files#diff-b408a07768aaddc7b73f38b26fb08aaeab74710c98a446ea03942fd875638e43
api.ts https://github.com/angular/angular/pull/32987/files#diff-6be45432905608c44eb83e52b9f1c975f6667c8cde6aa3cae0def55502a33fcc
ngtsc_spec.ts https://github.com/angular/angular/pull/32987/files#diff-9b200a5c9335361ab911b28a6e5baa0a4487cf4f0c2fc5b1c10bc46829426abb
compiler.ts https://github.com/angular/angular/pull/32987/files#diff-ac4064faf987a33dfff2f047785143fa56f89fc726a192ca9ba5c3954f2ccd92
compiler_facade_interface.ts https://github.com/angular/angular/pull/32987/files#diff-e577765cc283f392cc088f070123dfd505773dde21e8fe0ffb950b68c2eda23f
injectable_compiler_2.ts https://github.com/angular/angular/pull/32987/files#diff-51170a6686ecc9b080d05b256d647f76db0f646f178667ddee80b4ad1ca6bd1d
jit_compiler_facade.ts https://github.com/angular/angular/pull/32987/files#diff-01d6d00c4d4bc32fd756511329b51832d5992d909f137cd0f29a85448b05207d
r3_factory.ts https://github.com/angular/angular/pull/32987/files#diff-933238d1270d97a57cab4c7d7425cf7b112d514d23e17ed65faf8b4d4348aba8
r3_identifiers.ts https://github.com/angular/angular/pull/32987/files#diff-b8e22f4d293486e4728e970eb17751e6eef38e7ae8249279527e1abbb2e0bd81
r3_module_compiler.ts https://github.com/angular/angular/pull/32987/files#diff-46eddfe0653c3d025ebd259fa5fbcdc433e419a5a259c490c4ad27822d4cef76
r3_pipe_compiler.ts https://github.com/angular/angular/pull/32987/files#diff-571fa8bef5bb5fea52e8b076f41ae19f43dd15c611ea9209ea411438628994b8
api.ts https://github.com/angular/angular/pull/32987/files#diff-73bd90f92ccea688d3ee38be460e3e8c533a0683beff0ecff22cad8d4d3fa885
compiler.ts https://github.com/angular/angular/pull/32987/files#diff-647cc0586b8318c1805d5c42c57358ba468889567f85c7c381e2c635bdcb1fd6
compiler_facade_interface_spec.ts https://github.com/angular/angular/pull/32987/files#diff-6586fcaf15d59acfaa2efaeed02f6c6dea28203c20216663a8b5e7bcb4c9f459
compiler_facade_interface.ts https://github.com/angular/angular/pull/32987/files#diff-d1957eb629f15db37308fc835215fd8f0dc1316fb570a784624887c69aaa518e
core_render3_private_export.ts https://github.com/angular/angular/pull/32987/files#diff-de09a25a93c0410c75a7ff56fdc6fb572198bdbce5ecaa98cb001063018eb79e
injectable.ts https://github.com/angular/angular/pull/32987/files#diff-b8618cd301aa098a5c4d825e842ff16daabfa36bedda6d76bdea1afccefcbe1d
index.ts https://github.com/angular/angular/pull/32987/files#diff-a3ef3e01266ff033c4d48f63e1ba739566bdd8a0b2ce372c1659b67c456d8f82
di.ts https://github.com/angular/angular/pull/32987/files#diff-94f4315514ce583adf573aa14c85bad14c025eaa18a226aa7053c30571535cfe
directive.ts https://github.com/angular/angular/pull/32987/files#diff-4f93f07077211da349d6cebe7f4042363eb78ddcd97872c8359cd05a5de386b6
environment.ts https://github.com/angular/angular/pull/32987/files#diff-5b90e8d09c458d28c649738aadc150117eddab8963798868b60bc88d76c5534a
pipe.ts https://github.com/angular/angular/pull/32987/files#diff-e419bfcdc3d843083d851ea810afd857e78fedd5d2a9bcab451cf1f2da043483
core.d.ts https://github.com/angular/angular/pull/32987/files#diff-8f388213507c63c8d3b02879f66c9c72dd806fcce074db55ea9dac818f4e8de8
packages/compiler-cli/src/ngtsc/annotations/src/component.tshttps://github.com/angular/angular/pull/32987/files#diff-f2bb60ef38f35f7d41b0ac0868cc4267738c5e4c78e044336aec52d86a6e2d29
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/ngtsc/annotations/src/component.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-f2bb60ef38f35f7d41b0ac0868cc4267738c5e4c78e044336aec52d86a6e2d29
https://github.com/angular/angular/pull/32987/files#diff-f2bb60ef38f35f7d41b0ac0868cc4267738c5e4c78e044336aec52d86a6e2d29
https://github.com/angular/angular/pull/32987/files#diff-f2bb60ef38f35f7d41b0ac0868cc4267738c5e4c78e044336aec52d86a6e2d29
https://github.com/angular/angular/pull/32987/files#diff-f2bb60ef38f35f7d41b0ac0868cc4267738c5e4c78e044336aec52d86a6e2d29
packages/compiler-cli/src/ngtsc/annotations/src/directive.tshttps://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/ngtsc/annotations/src/directive.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
https://github.com/angular/angular/pull/32987/files#diff-bbe73773517a54ab50859c4ea219d8716d708910e4637889f5013b1094fe8400
packages/compiler-cli/src/ngtsc/annotations/src/factory.tshttps://github.com/angular/angular/pull/32987/files#diff-80e7e9575e031811f3872eea96d6993fb5ee53afd00bf89f20540732bbfef49c
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/ngtsc/annotations/src/factory.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-80e7e9575e031811f3872eea96d6993fb5ee53afd00bf89f20540732bbfef49c
packages/compiler-cli/src/ngtsc/annotations/src/injectable.tshttps://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
https://github.com/angular/angular/pull/32987/files#diff-ff6958d9fff47e0156915cac8202d78930adcf33d353c70e60b230981cc36f20
packages/compiler-cli/src/ngtsc/annotations/src/pipe.tshttps://github.com/angular/angular/pull/32987/files#diff-cca09745361bb2d9844269a54bb34dfc82c87e86ceac4f72ffe7b740634b2437
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/ngtsc/annotations/src/pipe.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-cca09745361bb2d9844269a54bb34dfc82c87e86ceac4f72ffe7b740634b2437
https://github.com/angular/angular/pull/32987/files#diff-cca09745361bb2d9844269a54bb34dfc82c87e86ceac4f72ffe7b740634b2437
https://github.com/angular/angular/pull/32987/files#diff-cca09745361bb2d9844269a54bb34dfc82c87e86ceac4f72ffe7b740634b2437
https://github.com/angular/angular/pull/32987/files#diff-cca09745361bb2d9844269a54bb34dfc82c87e86ceac4f72ffe7b740634b2437
packages/compiler-cli/src/ngtsc/annotations/src/util.tshttps://github.com/angular/angular/pull/32987/files#diff-b408a07768aaddc7b73f38b26fb08aaeab74710c98a446ea03942fd875638e43
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/ngtsc/annotations/src/util.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-b408a07768aaddc7b73f38b26fb08aaeab74710c98a446ea03942fd875638e43
JoostKhttps://github.com/JoostK
Oct 3, 2019https://github.com/angular/angular/pull/32987/files#r331241236
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/32987/files
alxhubhttps://github.com/alxhub
Oct 25, 2019https://github.com/angular/angular/pull/32987/files#r338844926
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/32987/files
https://github.com/angular/angular/pull/32987/files#diff-b408a07768aaddc7b73f38b26fb08aaeab74710c98a446ea03942fd875638e43
packages/compiler-cli/src/transformers/api.tshttps://github.com/angular/angular/pull/32987/files#diff-6be45432905608c44eb83e52b9f1c975f6667c8cde6aa3cae0def55502a33fcc
View file https://github.com/JoostK/angular/blob/fc8481b7700894f48d99fc228beee62bd4a66d33/packages/compiler-cli/src/transformers/api.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/32987/{{ revealButtonHref }}
https://github.com/angular/angular/pull/32987/files#diff-6be45432905608c44eb83e52b9f1c975f6667c8cde6aa3cae0def55502a33fcc
https://github.com/angular/angular/pull/32987/files#diff-6be45432905608c44eb83e52b9f1c975f6667c8cde6aa3cae0def55502a33fcc
Please reload this pagehttps://github.com/angular/angular/pull/32987/files
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.