Title: Import module specifier: "shortest" doesn't pre-select the shortest (typescript) · Issue #42235 · microsoft/TypeScript · GitHub
Open Graph Title: Import module specifier: "shortest" doesn't pre-select the shortest (typescript) · Issue #42235 · microsoft/TypeScript
X Title: Import module specifier: "shortest" doesn't pre-select the shortest (typescript) · Issue #42235 · microsoft/TypeScript
Description: VSCode Version: classic 1.52.1 and 1.53.0-insider OS Version: Windows 10 pro - 20H2 Steps to Reproduce: Clone that repo Run, npm install Verify your VSCode module import preference is setup is "shortest" Open main.ts and observe line 5, ...
Open Graph Description: VSCode Version: classic 1.52.1 and 1.53.0-insider OS Version: Windows 10 pro - 20H2 Steps to Reproduce: Clone that repo Run, npm install Verify your VSCode module import preference is setup is "sho...
X Description: VSCode Version: classic 1.52.1 and 1.53.0-insider OS Version: Windows 10 pro - 20H2 Steps to Reproduce: Clone that repo Run, npm install Verify your VSCode module import preference is setup is &quo...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/42235
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Import module specifier: \"shortest\" doesn't pre-select the shortest (typescript)","articleBody":"\u003c!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->\r\n\u003c!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->\r\n\u003c!-- Please search existing issues to avoid creating duplicates. -->\r\n\u003c!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->\r\n\r\n\u003c!-- Use Help > Report Issue to prefill these. -->\r\n- VSCode Version: classic 1.52.1 and 1.53.0-insider\r\n- OS Version: Windows 10 pro - 20H2\r\n \r\nSteps to Reproduce:\r\n\r\n1. Clone that [repo](https://github.com/hugoblanc/vscode-shortest-repro)\r\n2. Run, npm install \r\n3. Verify your VSCode module import preference is setup is \"shortest\" \r\n4. Open main.ts and observe line 5, the ideal shortest import (manually typed by me) `import { BasicDTO } from \"@repro-short-import/data\";`\r\n5. Open now app.component.ts and try to auto import `BasicDTO` from shared lib with ctrl+space.\r\n6. Optionnaly, use CTRL+. to try different import style and see that shortest is definitly not the first. Instead an absolut longer path is used `import { BasicDTO } from 'libs/data/src/lib/data';`\r\n\r\nIt is not due to the string length cause I got other repos where lib name is shorter than `@repro-short-import/data`;\r\n\r\n\u003c!-- Launch with `code --disable-extensions` to check. -->\r\nDoes this issue occur when all extensions are disabled?: Yes\r\n\r\nI'm using the insider version for every day coding and I downloaded the last clean and fresh vscode classic version to test this. These errors are occurring on both.\r\n\r\nUsing other type of import module specifier will eventually solve this issue but will cause some others => always use absolute path even for file which should be relatively imported. ","author":{"url":"https://github.com/hugoblanc","@type":"Person","name":"hugoblanc"},"datePublished":"2021-01-06T10:29:50Z","url":"https://github.com/microsoft/TypeScript/issues/42235"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:049c8d9f-a943-2056-21e7-d090f38462e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA84:2E7EBB:DA0AF1:1142A11:6B0101F3 |
| html-safe-nonce | 672e68ea642756c59a75028b5eaa502381903085b8cfc1bd43e85010b4bc3fe4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTg0OjJFN0VCQjpEQTBBRjE6MTE0MkExMTo2QjAxMDFGMyIsInZpc2l0b3JfaWQiOiI4Njc2NzEwODk0NzI3NjYwMDE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 05af3c50ac38a2733570db72434cbfb01214e8149d7edbcc69316d1fa6c0111a |
| hovercard-subject-tag | issue:780984932 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/42235/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e4d46d6a8615d99c120d9323775e950a29bae1a404775abf9ad4745b50c2641/microsoft/TypeScript/issues/42235 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e4d46d6a8615d99c120d9323775e950a29bae1a404775abf9ad4745b50c2641/microsoft/TypeScript/issues/42235 |
| og:image:alt | VSCode Version: classic 1.52.1 and 1.53.0-insider OS Version: Windows 10 pro - 20H2 Steps to Reproduce: Clone that repo Run, npm install Verify your VSCode module import preference is setup is "sho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hugoblanc |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width