René's URL Explorer Experiment


Title: feat(language-service): Allow auto-imports of a pipe via quick fix when its selector is used. by dylhunn · Pull Request #48354 · angular/angular · GitHub

Open Graph Title: feat(language-service): Allow auto-imports of a pipe via quick fix when its selector is used. by dylhunn · Pull Request #48354 · angular/angular

X Title: feat(language-service): Allow auto-imports of a pipe via quick fix when its selector is used. by dylhunn · Pull Request #48354 · angular/angular

Description: Four commits, as below: refactor(language-service): Improve the quick fix auto-import tests. Currently, the auto-import tests are very difficult to debug, because the expectations are buried several function calls deep, and also because the multi-line replacements are hard to deal with. The auto-import tests now use a different approach, which can be easily debugged from the failure message. In addition, several new tests have been added to cover more cases. refactor(compiler-cli): Make getKnown return an array of nodes. MetadataReaderWithIndex.getKnown currently returns an iterator. It will be easier to work with for upcoming usages if it returns an array instead. feat(language-service): Introduce a new NgModuleIndex, and use it to suggest re-exports. NgModules can re-export other NgModules, which transitively includes all traits exported by the re-exported NgModule. We want to be able to suggest all re-exports of a component when trying to auto-import it. Previously, we used an approximation when importing from NgModules: we looked at a Component's metadata, and just imported the declaring NgModule. However, this is not technically correct -- the declaring NgModule it is not necessarily the same one that exports it for the current scope. (Indeed, there could be multiple re-exports!) As a replacement, I have implemented a more general solution. This PR introduces a new class on the template type checker, called NgModuleIndex. When queried, it conducts a depth-first-search over the NgModule import/export graph, in order to find all NgModules anywhere in the current dependency graph, as well as all exports of those NgModules. This allows the language service to suggest all of the re-exports, in addition to the original export. feat(language-service): Allow auto-imports of a pipe via quick fix when its selector is used, both directly and via reexports. A previous PR introduced a new compiler abstraction that tracks all known exports and re-exports of Angular traits. This PR harnesses that abstraction in the language service, in order to allow automatic imports of pipes.

Open Graph Description: Four commits, as below: refactor(language-service): Improve the quick fix auto-import tests. Currently, the auto-import tests are very difficult to debug, because the expectations are buried severa...

X Description: Four commits, as below: refactor(language-service): Improve the quick fix auto-import tests. Currently, the auto-import tests are very difficult to debug, because the expectations are buried severa...

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

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:019f4069-29e3-f5c3-6cbd-c52a50297436
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8E48:14700E:947489:BE3FD4:6B00ED74
html-safe-nonce0293a24525b0a276908368179c7a48d137e38caf86d2ba30f9060d4539dd9eeb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTQ4OjE0NzAwRTo5NDc0ODk6QkUzRkQ0OjZCMDBFRDc0IiwidmlzaXRvcl9pZCI6IjgzMzQzNjY5NzU3NzgxNTU4OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9659554f0bee819e0d6a1f111a9decd4f99d6fd7c5d1baa416933fb99d5ebbbc
hovercard-subject-tagpull_request:1145522414
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/48354/files
twitter:imagehttps://avatars.githubusercontent.com/u/7135246?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7135246?s=400&v=4
og:image:altFour commits, as below: refactor(language-service): Improve the quick fix auto-import tests. Currently, the auto-import tests are very difficult to debug, because the expectations are buried severa...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/pull/48354/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F48354%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%2F48354%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/48354/files
Reloadhttps://github.com/angular/angular/pull/48354/files
Reloadhttps://github.com/angular/angular/pull/48354/files
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests140 (140)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
dylhunnhttps://github.com/dylhunn
angular:mainhttps://github.com/angular/angular/tree/main
dylhunn:ls-pipeshttps://github.com/dylhunn/angular/tree/ls-pipes
Conversation 64 https://github.com/angular/angular/pull/48354
Commits 4 https://github.com/angular/angular/pull/48354/commits
Checks 0 https://github.com/angular/angular/pull/48354/checks
Files changed https://github.com/angular/angular/pull/48354/files
Please reload this pagehttps://github.com/angular/angular/pull/48354/files
feat(language-service): Allow auto-imports of a pipe via quick fix when its selector is used. https://github.com/angular/angular/pull/48354/files#top
Show all changes 4 commits https://github.com/angular/angular/pull/48354/files
8ed0178 refactor(language-service): Improve the quick fix auto-import tests. dylhunn Dec 5, 2022 https://github.com/angular/angular/pull/48354/commits/8ed0178268f0742c194f3e87efe2dbf7499700e0
f7bb7b6 refactor(compiler-cli): Make `getKnown` return an array of nodes. dylhunn Jan 5, 2023 https://github.com/angular/angular/pull/48354/commits/f7bb7b65ddde8bdb9168c56222aee6223a291616
9f5ece8 feat(language-service): Introduce a new NgModuleIndex, and use it to … dylhunn Jan 5, 2023 https://github.com/angular/angular/pull/48354/commits/9f5ece8e5234c47d847871d426ab600e809260a6
18b0681 feat(language-service): Allow auto-imports of a pipe via quick fix wh… dylhunn Dec 20, 2022 https://github.com/angular/angular/pull/48354/commits/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5
Clear filters https://github.com/angular/angular/pull/48354/files
Please reload this pagehttps://github.com/angular/angular/pull/48354/files
Please reload this pagehttps://github.com/angular/angular/pull/48354/files
compiler.ts https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
api.ts https://github.com/angular/angular/pull/48354/files#diff-9e23176371d64fc1dd48192e70bf86e05a78397d11e197d218b0c8826027a97d
ng_module_index.ts https://github.com/angular/angular/pull/48354/files#diff-86c82cea07afba3cc1f7b4462390e95d96960f3e97d44d8c2f4624c7fffb84b6
registry.ts https://github.com/angular/angular/pull/48354/files#diff-de464995940866b9da47e90a519e4e8745c9e0d9a50c9a4237ee2f30df47d264
checker.ts https://github.com/angular/angular/pull/48354/files#diff-7bf9dad2e59e665f713f63646e74b22c3e0314fbd5409640f93aa3f16979b953
checker.ts https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
index.ts https://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
fix_missing_import.ts https://github.com/angular/angular/pull/48354/files#diff-d021b88eac12fad2e929f49cbf44b66f2dff7edc1056c56885386aff87d0fbaf
code_fixes_spec.ts https://github.com/angular/angular/pull/48354/files#diff-7ab64bd746252eaf87b95882ead1cf3801df59300221c6268eec87e342a386bf
packages/compiler-cli/src/ngtsc/core/src/compiler.tshttps://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/core/src/compiler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
https://github.com/angular/angular/pull/48354/files#diff-f610248af7a32ea1af63f53a77acf0c7f71d890089d8dd88c189aa829c50c7cc
packages/compiler-cli/src/ngtsc/metadata/src/api.tshttps://github.com/angular/angular/pull/48354/files#diff-9e23176371d64fc1dd48192e70bf86e05a78397d11e197d218b0c8826027a97d
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/metadata/src/api.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
https://github.com/angular/angular/pull/48354/files#diff-9e23176371d64fc1dd48192e70bf86e05a78397d11e197d218b0c8826027a97d
https://github.com/angular/angular/pull/48354/files#diff-9e23176371d64fc1dd48192e70bf86e05a78397d11e197d218b0c8826027a97d
packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.tshttps://github.com/angular/angular/pull/48354/files#diff-86c82cea07afba3cc1f7b4462390e95d96960f3e97d44d8c2f4624c7fffb84b6
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
Please reload this pagehttps://github.com/angular/angular/pull/48354/files
packages/compiler-cli/src/ngtsc/metadata/src/registry.tshttps://github.com/angular/angular/pull/48354/files#diff-de464995940866b9da47e90a519e4e8745c9e0d9a50c9a4237ee2f30df47d264
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/metadata/src/registry.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
https://github.com/angular/angular/pull/48354/files#diff-de464995940866b9da47e90a519e4e8745c9e0d9a50c9a4237ee2f30df47d264
https://github.com/angular/angular/pull/48354/files#diff-de464995940866b9da47e90a519e4e8745c9e0d9a50c9a4237ee2f30df47d264
packages/compiler-cli/src/ngtsc/typecheck/api/checker.tshttps://github.com/angular/angular/pull/48354/files#diff-7bf9dad2e59e665f713f63646e74b22c3e0314fbd5409640f93aa3f16979b953
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/typecheck/api/checker.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
https://github.com/angular/angular/pull/48354/files#diff-7bf9dad2e59e665f713f63646e74b22c3e0314fbd5409640f93aa3f16979b953
https://github.com/angular/angular/pull/48354/files#diff-7bf9dad2e59e665f713f63646e74b22c3e0314fbd5409640f93aa3f16979b953
packages/compiler-cli/src/ngtsc/typecheck/src/checker.tshttps://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
https://github.com/angular/angular/pull/48354/files#diff-a0ed0852ff66702fe4085465e0f735265c83782c4afe7fab466b53d87a564580
packages/compiler-cli/src/ngtsc/typecheck/testing/index.tshttps://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
View file https://github.com/dylhunn/angular/blob/18b0681fd822ebbdde632a41f3a3fb65c4ac8be5/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/48354/{{ revealButtonHref }}
https://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
https://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
https://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
https://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
Please reload this pagehttps://github.com/angular/angular/pull/48354/files
Please reload this pagehttps://github.com/angular/angular/pull/48354/files
https://github.com/angular/angular/pull/48354/files#diff-49fe94d4a7d4e7db381db4e750af7e031e9f33f09b3b89e29ab1f3fe7fa77546
Please reload this pagehttps://github.com/angular/angular/pull/48354/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.