Title: [Feature Request] Print project directory when diagnostics enabled · Issue #32496 · microsoft/TypeScript · GitHub
Open Graph Title: [Feature Request] Print project directory when diagnostics enabled · Issue #32496 · microsoft/TypeScript
X Title: [Feature Request] Print project directory when diagnostics enabled · Issue #32496 · microsoft/TypeScript
Description: Search Terms diagnostics, project directory Suggestion I have about 40+ sub-projects in a composite project right now and when building, it takes about 10 minutes. It's hard to troubleshoot which projects are the bottleneck when I don't ...
Open Graph Description: Search Terms diagnostics, project directory Suggestion I have about 40+ sub-projects in a composite project right now and when building, it takes about 10 minutes. It's hard to troubleshoot which p...
X Description: Search Terms diagnostics, project directory Suggestion I have about 40+ sub-projects in a composite project right now and when building, it takes about 10 minutes. It's hard to troubleshoot whi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/32496
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Feature Request] Print project directory when diagnostics enabled","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the \"Common Feature Requests\" section.\r\n\r\n-->\r\n\r\n## Search Terms\r\n\r\n\u003c!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->\r\n\r\ndiagnostics, project directory\r\n\r\n## Suggestion\r\n\r\n\u003c!-- A summary of what you'd like to see added or changed -->\r\n\r\nI have about 40+ sub-projects in a `composite` project right now and when building, it takes about 10 minutes.\r\n\r\nIt's hard to troubleshoot which projects are the bottleneck when I don't even know which projects are being built.\r\n\r\nEnabling diagnostics only tells me how long a project took but doesn't tell me what that project is.\r\n\r\nSo, my feature request is to print the project directory when `diagnostics` is enabled.\r\n\r\n-----\r\n\r\nAt the moment, I've modified my own `tsc.js`,\r\n\r\n```ts\r\n//Find this line\r\nreportTimeStatistic(\"Total time\", programTime + bindTime + checkTime + emitTime);\r\n```\r\n\r\n```ts\r\n//Replace with this snippet\r\nreportTimeStatistic(\"Total time\", programTime + bindTime + checkTime + emitTime);\r\nif (program.getRootFileNames().length > 0) {\r\n const path = program.getRootFileNames()[0].replace(/\\/[^/]+?\\.[^.]+?$/, \"\");\r\n reportStatisticalValue(\"Project\", (\r\n path.indexOf(program.getCurrentDirectory()) == 0 ?\r\n path.substr(program.getCurrentDirectory().length) :\r\n path\r\n ));\r\n}\r\n```\r\n\r\nIt works enough for me,\r\n```\r\nFiles: 2944\r\nLines: 279749\r\nNodes: 1473021\r\nIdentifiers: 417022\r\nSymbols: 295304\r\nTypes: 73\r\nMemory used: 748010K\r\nAssignability cache size: 0\r\nIdentity cache size: 0\r\nSubtype cache size: 0\r\nI/O Read time: 0.02s\r\nParse time: 0.21s\r\nProgram time: 0.84s\r\nBind time: 0.18s\r\nprintTime time: 0.01s\r\nEmit time: 0.01s\r\nI/O Write time: 0.01s\r\nTotal time: 1.03s\r\nProject: /src/app-route-handler\r\n```\r\n\r\n-----\r\n\r\nI don't really know much about the TypeScript API. There's probably a proper way to get this information but with my limited knowledge, I managed to hack that together.\r\n\r\n## Checklist\r\n\r\nMy suggestion meets these guidelines:\r\n\r\n* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code\r\n* [X] This wouldn't change the runtime behavior of existing JavaScript code\r\n* [X] This could be implemented without emitting different JS based on the types of the expressions\r\n* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)\r\n* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).\r\n\r\n","author":{"url":"https://github.com/AnyhowStep","@type":"Person","name":"AnyhowStep"},"datePublished":"2019-07-20T08:34:41Z","url":"https://github.com/microsoft/TypeScript/issues/32496"}
| 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:72bf789c-e5c0-b9ef-a456-0ac2ad44ed99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8DE:2F543F:7F83EF:A92CD9:6B01ADC4 |
| html-safe-nonce | 2fb0d493707eccf67c90635782bc6dfae55d02624694b657853e15f5e71a48c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOERFOjJGNTQzRjo3RjgzRUY6QTkyQ0Q5OjZCMDFBREM0IiwidmlzaXRvcl9pZCI6IjY1MzU0MzkzMTk5MjA5MTM4NjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | da6a8a6e984a62417ecc0a5216be1b1c01de9da3d20fd73e3ea4251a7a3cc4e8 |
| hovercard-subject-tag | issue:470651082 |
| 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/32496/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5f0350e6458bfd1111a9daccba580c5d90e30e9666e880f4958a6a93d8bfc44/microsoft/TypeScript/issues/32496 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5f0350e6458bfd1111a9daccba580c5d90e30e9666e880f4958a6a93d8bfc44/microsoft/TypeScript/issues/32496 |
| og:image:alt | Search Terms diagnostics, project directory Suggestion I have about 40+ sub-projects in a composite project right now and when building, it takes about 10 minutes. It's hard to troubleshoot which p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AnyhowStep |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width