René's URL Explorer Experiment


Title: List of various Type completion flaws · Issue #16798 · PowerShell/PowerShell · GitHub

Open Graph Title: List of various Type completion flaws · Issue #16798 · PowerShell/PowerShell

X Title: List of various Type completion flaws · Issue #16798 · PowerShell/PowerShell

Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

Open Graph Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

X Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

Opengraph URL: https://github.com/PowerShell/PowerShell

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"List of various Type completion flaws","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nI've looked into the type completion and have come up with this list of issues:\r\n\r\n1: It doesn't take conflicting `Using namespace` statements into consideration, for example:\r\n```\r\nusing namespace System.Threading\r\nusing namespace System.Timers\r\n[Timer\u003cTab>\r\n```\r\nwill suggest \"Timer\" but if you actually tried to use that you would get a runtime error due to the ambiguous type (it's either System.Threading.Timer or System.Timers.Timer). Ideally it would find the shortest unambiguous name, which in this case would be Threading.Timer and Timers.Timer due to the implicit System namespace.\r\n\r\n2: PowerShell types and Using namespace statements are only taken into consideration if they are included in the script text that is being completed. To demonstrate, you can add an Enum and a using statement to your $profile:\r\n```\r\nusing namespace System.Collections.Generic\r\nenum Whatever\r\n{\r\n    value1 = 1\r\n}\r\n```\r\nFrom a new console, If you try to complete `Whatever` in the console you'll get no results. If you try to complete `List` it will suggest `System.Collections.Generic.List` instead of just `List`.  \r\nIdeally PowerShell types defined in the script text as well as ones that have been loaded into the session should be included in the completions. For using statements, it should use the ones in the script text and if there aren't any, fall back to the ones loaded into the session.\r\n\r\n3: PowerShell types imported through using module aren't considered for completion. Fixing the previous issue would partially fix this, but maybe it's also worth parsing the specified module? The Symbol resolver code does this at parse time so maybe the completion code should as well?\r\n\r\n4: Namespaces aren't taken into consideration when completing input, their only use seems to be to trim types that are found. For example:\r\n```\r\nusing namespace System.Collections\r\n[Generic.List\u003cTab>\r\n#or\r\n[Generic.\u003cTab>\r\n```\r\n\r\nwon't complete to anything. You have to type the full name to get any completions.\r\n\r\n5: Quotes aren't handled properly in the namespace removal in the completion if used in `using namespace`\r\nFor example:\r\n```\r\nusing namespace \"System.Management\"\r\n[token\u003cTab>\r\n```\r\ncompletes to `[tomation.Language.Token]` instead of `[Automation.Language.Token]`\r\n### Expected behavior\r\n\r\n```console\r\nN/A\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nN/A\r\n```\r\n\r\n\r\n### Error details\r\n\r\n_No response_\r\n\r\n### Environment data\r\n\r\n```powershell\r\nPS C:\\Users\\Martin> $PSVersionTable\r\n\r\nName                           Value\r\n----                           -----\r\nPSVersion                      7.2.0-preview.10\r\nPSEdition                      Core\r\nGitCommitId                    7.2.0-preview.10\r\nOS                             Microsoft Windows 10.0.19044\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/MartinGC94","@type":"Person","name":"MartinGC94"},"datePublished":"2022-01-24T23:20:25Z","url":"https://github.com/PowerShell/PowerShell/issues/16798"}

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/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:14b5630d-8cbe-98b0-6107-39d30806563f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB7BC:1EF65E:2B019:3F4D8:6AFDBB5B
html-safe-nonce458a51a1086fa404594ae6a69e2d5469c2169436c12fe1a0a9e353ea3b00a920
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0JDOjFFRjY1RToyQjAxOTozRjREODo2QUZEQkI1QiIsInZpc2l0b3JfaWQiOiI3NDM4MzcyMzk5MDkyNzEwMjM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb7c7a8d92ff6ce395a19630be721978831d47739f74bb01132421eb9fcdce4da
hovercard-subject-tagrepository:49609581
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/issues/16798
twitter:imagehttps://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd
twitter:cardsummary_large_image
og:imagehttps://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd
og:image:altPowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None8309f07eb60a4237a657068c83d0bb57be4c7e02937f5e9933126f4bd596aac4
turbo-cache-controlno-cache
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
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
release2f7154d847f1ddc5baa83b109a3e1d924605e2a3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/16798#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F16798
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%2FPowerShell%2FPowerShell%2Fissues%2F16798
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/16798
Reloadhttps://github.com/PowerShell/PowerShell/issues/16798
Reloadhttps://github.com/PowerShell/PowerShell/issues/16798
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/16798
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/16798
#16875https://github.com/PowerShell/PowerShell/pull/16875
List of various Type completion flawshttps://github.com/PowerShell/PowerShell/issues/16798#top
#16875https://github.com/PowerShell/PowerShell/pull/16875
In-PRIndicates that a PR is out for the issuehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22In-PR%22
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
WG-Interactive-IntelliSensetab completionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Interactive-IntelliSense%22
https://github.com/MartinGC94
MartinGC94https://github.com/MartinGC94
on Jan 24, 2022https://github.com/PowerShell/PowerShell/issues/16798#issue-1113247869
latest released versionhttps://github.com/PowerShell/PowerShell/releases
FAQhttps://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md
Differences between Windows PowerShell 5.1 and PowerShellhttps://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
MartinGC94https://github.com/MartinGC94
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Jan 24, 2022https://github.com/PowerShell/PowerShell/issues/16798#event-5946114932
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on Jan 25, 2022https://github.com/PowerShell/PowerShell/issues/16798#issuecomment-1020773633
Rain Sallow (/u/ta11ow) (@vexx32)https://github.com/vexx32
Patrick Meinecke (@SeeminglyScience)https://github.com/SeeminglyScience
Ilya (iSazonov)https://github.com/iSazonov
WG-Interactive-IntelliSensetab completionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Interactive-IntelliSense%22
on Jan 25, 2022https://github.com/PowerShell/PowerShell/issues/16798#event-5946896844
https://github.com/vexx32
Rain Sallow (/u/ta11ow) (vexx32)https://github.com/vexx32
on Jan 25, 2022https://github.com/PowerShell/PowerShell/issues/16798#issuecomment-1020779782
https://github.com/MartinGC94
MartinGC94https://github.com/MartinGC94
on Jan 25, 2022https://github.com/PowerShell/PowerShell/issues/16798#issuecomment-1020850513
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on Jan 25, 2022https://github.com/PowerShell/PowerShell/issues/16798#issuecomment-1021029972
In-PRIndicates that a PR is out for the issuehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22In-PR%22
on Feb 11, 2022https://github.com/PowerShell/PowerShell/issues/16798#event-6054501110
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Nov 15, 2023https://github.com/PowerShell/PowerShell/issues/16798#issuecomment-1811662653
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
on Nov 15, 2023https://github.com/PowerShell/PowerShell/issues/16798#event-10961874112
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Nov 22, 2023https://github.com/PowerShell/PowerShell/issues/16798#issuecomment-1822556686
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 22, 2023https://github.com/PowerShell/PowerShell/issues/16798#event-11035043381
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/16798
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/16798
In-PRIndicates that a PR is out for the issuehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22In-PR%22
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
WG-Interactive-IntelliSensetab completionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Interactive-IntelliSense%22
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.