Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix completion details auto-imports crashes #52686

Merged
merged 8 commits into from
Feb 10, 2023

Conversation

andrewbranch
Copy link
Member

Fixes #52661

The ExportInfoMap is a multimap that contains information about every way that every export is re-exported from different places. Usually, a single symbol that gets re-exported multiple times has a single key pointing to an array of each place it’s exported from. When auto-imports are displayed in completions, we show one completion per key, and we simply pick the “best” re-exporting location out of that array. This lets us prefer short import paths over deep imports. (When and whether this is actually a good heuristic is beside the point.)

The exception is when a single symbol is exported by an ambient module. Ambient modules are considered a stronger signal that the name of the module is significant. For example, when "node:fs" re-exports everything from "fs", we don’t want to be forced to pick which module is the “better” place to import readFile from—we’d rather show a completion for both, even though the exported symbol is the same in both. So each of these get their own keys in the multimap.

When completionEntryDetails is called and we have to re-find the export we showed in the previous completionInfo request, we never used to check the module symbol when searching the ExportInfoMap—instead, we asserted on it later, issuing the message seen in the telemetry bug. The fix is simply to check that the module symbol matches as part of our search instead of returning the first export info where just the export symbol itself matches.

The fix sounds obvious, so why was this not more broken before? Well, when completionEntryDetails is called for an import from an ambient module, we were able to take shortcut that skips this search through the ExportInfoMap containing the faulty code. So the only way for the bug to manifest is when we request details for a symbol that a non-ambient module re-exports from an ambient module, and the iteration order mattered—it could have been correct by coincidence sometimes.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 8, 2023
@andrewbranch
Copy link
Member Author

@typescript-bot user test tsserver

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 8, 2023

Heya @andrewbranch, I've started to run the diff-based user code test suite (tsserver) on this PR at a1d36cd. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@andrewbranch Here are the results of running the user test suite comparing main and refs/pull/52686/merge:

Something interesting changed - please have a look.

Details

create-react-app

⚠️ Note that built also had errors ⚠️
Req #1867 - completionEntryDetails
    at getSingleExportInfoForSymbol (/typescript-main/built/local/tsserver.js:141040:16)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:140986:78)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149107:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:148993:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:134907:35)
    at /typescript-main/built/local/tsserver.js:178466:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178464:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:176810:43)
    at /typescript-main/built/local/tsserver.js:179154:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179146:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179154:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179196:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180740:14)
Req #1867 - completionEntryDetails
    at getSingleExportInfoForSymbol (/typescript-52686/built/local/tsserver.js:141039:16)
    at Object.getImportCompletionAction (/typescript-52686/built/local/tsserver.js:140986:78)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149106:62)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:148992:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:134907:35)
    at /typescript-52686/built/local/tsserver.js:178465:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178463:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:176809:43)
    at /typescript-52686/built/local/tsserver.js:179153:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179145:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179153:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179195:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:180739:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults2/create-react-app.rawError.txt in the artifact folder

Last few requests

{"seq":1864,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/packages/react-scripts/config/modules.js","line":111,"offset":1,"entryNames":[{"name":"profile","source":"console","data":{"exportName":"profile","moduleSpecifier":"console","ambientModuleName":"console"}}]}}
{"seq":1865,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/packages/react-scripts/config/modules.js","line":111,"offset":1,"entryNames":[{"name":"profileEnd","source":"console","data":{"exportName":"profileEnd","moduleSpecifier":"console","ambientModuleName":"console"}}]}}
{"seq":1866,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/packages/react-scripts/config/modules.js","line":111,"offset":1,"entryNames":[{"name":"Profiler","source":"react","data":{"exportName":"Profiler","moduleSpecifier":"react","fileName":"/mnt/ts_downloads/create-react-app/node_modules/@types/react/index.d.ts"}}]}}
{"seq":1867,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/packages/react-scripts/config/modules.js","line":111,"offset":1,"entryNames":[{"name":"promises","source":"dns","data":{"exportName":"promises","moduleSpecifier":"dns","ambientModuleName":"dns"}}]}}

Repro Steps

  1. git clone https://github.com/facebook/create-react-app.git --recurse-submodules
  2. In dir create-react-app, run git reset --hard d960b9e38c062584ff6cfb1a70e1512509a966e7
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir create-react-app/docusaurus/website, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir create-react-app, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
  4. Back in the initial folder, download RepoResults2/create-react-app.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./create-react-app ./create-react-app.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

fp-ts

⚠️ Note that built also had errors ⚠️
Req #8815 - completionEntryDetails
    at getSingleExportInfoForSymbol (/typescript-main/built/local/tsserver.js:141040:16)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:140986:78)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149107:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:148993:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:134907:35)
    at /typescript-main/built/local/tsserver.js:178466:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178464:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:176810:43)
    at /typescript-main/built/local/tsserver.js:179154:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179146:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179154:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179196:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180740:14)
Req #8815 - completionEntryDetails
    at getSingleExportInfoForSymbol (/typescript-52686/built/local/tsserver.js:141039:16)
    at Object.getImportCompletionAction (/typescript-52686/built/local/tsserver.js:140986:78)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149106:62)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:148992:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:134907:35)
    at /typescript-52686/built/local/tsserver.js:178465:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178463:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:176809:43)
    at /typescript-52686/built/local/tsserver.js:179153:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179145:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179153:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179195:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:180739:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults2/fp-ts.rawError.txt in the artifact folder

Last few requests

{"seq":8812,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/IOEither.ts","line":199,"offset":24,"entryNames":[{"name":"brotliCompressSync","source":"zlib","data":{"exportName":"brotliCompressSync","moduleSpecifier":"zlib","ambientModuleName":"zlib"}}]}}
{"seq":8813,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/IOEither.ts","line":199,"offset":24,"entryNames":[{"name":"brotliDecompress","source":"zlib","data":{"exportName":"brotliDecompress","moduleSpecifier":"zlib","ambientModuleName":"zlib"}}]}}
{"seq":8814,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/IOEither.ts","line":199,"offset":24,"entryNames":[{"name":"brotliDecompressSync","source":"zlib","data":{"exportName":"brotliDecompressSync","moduleSpecifier":"zlib","ambientModuleName":"zlib"}}]}}
{"seq":8815,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/IOEither.ts","line":199,"offset":24,"entryNames":[{"name":"Buffer","source":"buffer","data":{"exportName":"Buffer","moduleSpecifier":"buffer","ambientModuleName":"buffer"}}]}}

Repro Steps

  1. git clone https://github.com/gcanti/fp-ts.git --recurse-submodules
  2. In dir fp-ts, run git reset --hard 9da2137efb295b82fb59b7b0c2114f2ceb40a2b5
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir fp-ts, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir fp-ts, run npm install @types/node @types/jest --no-save --ignore-scripts --legacy-peer-deps
  4. Back in the initial folder, download RepoResults2/fp-ts.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./fp-ts ./fp-ts.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

npm

⚠️ Note that built also had errors ⚠️
Req #588 - completionEntryDetails
    at getImportFixForSymbol (/typescript-main/built/local/tsserver.js:141013:9)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:140990:34)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149107:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:148993:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:134907:35)
    at /typescript-main/built/local/tsserver.js:178466:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178464:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:176810:43)
    at /typescript-main/built/local/tsserver.js:179154:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179146:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179154:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179196:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180740:14)
Req #862 - completionEntryDetails
    at getSingleExportInfoForSymbol (/typescript-52686/built/local/tsserver.js:141039:16)
    at Object.getImportCompletionAction (/typescript-52686/built/local/tsserver.js:140986:78)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149106:62)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:148992:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:134907:35)
    at /typescript-52686/built/local/tsserver.js:178465:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178463:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:176809:43)
    at /typescript-52686/built/local/tsserver.js:179153:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179145:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179153:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179195:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:180739:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults3/npm.rawError.txt in the artifact folder

Last few requests

{"seq":859,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/commands/config.js","line":137,"offset":13,"entryNames":[{"name":"profile","source":"console","data":{"exportName":"profile","moduleSpecifier":"console","ambientModuleName":"console"}}]}}
{"seq":860,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/commands/config.js","line":137,"offset":13,"entryNames":[{"name":"profileEnd","source":"console","data":{"exportName":"profileEnd","moduleSpecifier":"console","ambientModuleName":"console"}}]}}
{"seq":861,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/commands/config.js","line":137,"offset":13,"entryNames":[{"name":"progressEnabled","source":"npmlog","data":{"exportName":"progressEnabled","moduleSpecifier":"npmlog","fileName":"/mnt/ts_downloads/npm/node_modules/npmlog/lib/log.js"}}]}}
{"seq":862,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/commands/config.js","line":137,"offset":13,"entryNames":[{"name":"promises","source":"dns","data":{"exportName":"promises","moduleSpecifier":"dns","ambientModuleName":"dns"}}]}}

Repro Steps

  1. git clone https://github.com/npm/cli.git --recurse-submodules
  2. In dir npm, run git reset --hard c606653399aa0dfc3526b52b75ccd0106c7ec1e2
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir npm/docs, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir npm/docs, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    3. In dir npm/mock-registry, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    4. In dir npm/mock-registry, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    5. In dir npm, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    6. In dir npm, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    7. In dir npm/smoke-tests, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    8. In dir npm/smoke-tests, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    9. In dir npm/workspaces/arborist, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    10. In dir npm/workspaces/arborist, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    11. In dir npm/workspaces/config, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    12. In dir npm/workspaces/config, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    13. In dir npm/workspaces/libnpmaccess, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    14. In dir npm/workspaces/libnpmaccess, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    15. In dir npm/workspaces/libnpmdiff, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    16. In dir npm/workspaces/libnpmdiff, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    17. In dir npm/workspaces/libnpmexec, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    18. In dir npm/workspaces/libnpmexec, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    19. In dir npm/workspaces/libnpmfund, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    20. In dir npm/workspaces/libnpmfund, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    21. In dir npm/workspaces/libnpmhook, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    22. In dir npm/workspaces/libnpmhook, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    23. In dir npm/workspaces/libnpmorg, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    24. In dir npm/workspaces/libnpmorg, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    25. In dir npm/workspaces/libnpmpack, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    26. In dir npm/workspaces/libnpmpack, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    27. In dir npm/workspaces/libnpmpublish, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    28. In dir npm/workspaces/libnpmpublish, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    29. In dir npm/workspaces/libnpmsearch, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    30. In dir npm/workspaces/libnpmsearch, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    31. In dir npm/workspaces/libnpmteam, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    32. In dir npm/workspaces/libnpmteam, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    33. In dir npm/workspaces/libnpmversion, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    34. In dir npm/workspaces/libnpmversion, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
  4. Back in the initial folder, download RepoResults3/npm.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./npm ./npm.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

webpack

⚠️ Note that built also had errors ⚠️
Req #1148 - completionEntryDetails
    at getImportFixForSymbol (/typescript-main/built/local/tsserver.js:141013:9)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:140990:34)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149107:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:148993:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:134907:35)
    at /typescript-main/built/local/tsserver.js:178466:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178464:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:176810:43)
    at /typescript-main/built/local/tsserver.js:179154:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179146:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179154:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179196:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180740:14)
Req #3536 - completionEntryDetails
    at getSingleExportInfoForSymbol (/typescript-52686/built/local/tsserver.js:141039:16)
    at Object.getImportCompletionAction (/typescript-52686/built/local/tsserver.js:140986:78)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149106:62)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:148992:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:134907:35)
    at /typescript-52686/built/local/tsserver.js:178465:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178463:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:176809:43)
    at /typescript-52686/built/local/tsserver.js:179153:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179145:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179153:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179195:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:180739:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/webpack.rawError.txt in the artifact folder

Last few requests

{"seq":3533,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/buildChunkGraph.js","line":448,"offset":23,"entryNames":[{"name":"Program","source":"assemblyscript/src/index","data":{"exportName":"Program","moduleSpecifier":"assemblyscript/src/index","ambientModuleName":"assemblyscript/src/index"}}]}}
{"seq":3534,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/buildChunkGraph.js","line":448,"offset":23,"entryNames":[{"name":"Program","source":"/mnt/ts_downloads/webpack/node_modules/assemblyscript/index","data":{"exportName":"Program","exportMapKey":"Program|22615|","fileName":"/mnt/ts_downloads/webpack/node_modules/assemblyscript/index.d.ts"}}]}}
{"seq":3535,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/buildChunkGraph.js","line":448,"offset":23,"entryNames":[{"name":"ProgressPlugin","source":"/mnt/ts_downloads/webpack/lib/ProgressPlugin","data":{"exportName":"export=","exportMapKey":"ProgressPlugin|26409|","fileName":"/mnt/ts_downloads/webpack/lib/ProgressPlugin.js"}}]}}
{"seq":3536,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/buildChunkGraph.js","line":448,"offset":23,"entryNames":[{"name":"promises","source":"dns","data":{"exportName":"promises","moduleSpecifier":"dns","ambientModuleName":"dns"}}]}}

Repro Steps

  1. git clone https://github.com/webpack/webpack.git --recurse-submodules
  2. In dir webpack, run git reset --hard b67626c7b4ffed8737d195b27c8cea1e68d58134
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir webpack, run yarn install --ignore-engines --ignore-scripts --silent
    2. In dir webpack/test/cases/entry-exports-field/imports, run yarn install --ignore-engines --ignore-scripts --silent
    3. In dir webpack/test/cases/entry-exports-field/self, run yarn install --ignore-engines --ignore-scripts --silent
    4. In dir webpack/test/cases/inner-graph/no-side-effects/package, run yarn install --ignore-engines --ignore-scripts --silent
    5. In dir webpack/test/cases/inner-graph/static-of-class/other, run yarn install --ignore-engines --ignore-scripts --silent
    6. In dir webpack/test/cases/loaders/issue-4959, run yarn install --ignore-engines --ignore-scripts --silent
    7. In dir webpack/test/cases/mjs/cjs-import-default, run yarn install --ignore-engines --ignore-scripts --silent
    8. In dir webpack/test/cases/mjs/namespace-object-lazy, run yarn install --ignore-engines --ignore-scripts --silent
    9. In dir webpack/test/cases/mjs/no-module-main-field, run yarn install --ignore-engines --ignore-scripts --silent
    10. In dir webpack/test/cases/mjs/type-module, run yarn install --ignore-engines --ignore-scripts --silent
    11. In dir webpack/test/cases/mjs/type-null, run yarn install --ignore-engines --ignore-scripts --silent
    12. In dir webpack/test/cases/parsing/harmony-export-import-specifier/side-effect-free, run yarn install --ignore-engines --ignore-scripts --silent
    13. In dir webpack/test/cases/parsing/harmony-star-conflict/named-with-namespace-no-side, run yarn install --ignore-engines --ignore-scripts --silent
    14. In dir webpack/test/cases/scope-hoisting/order-without-side-effects, run yarn install --ignore-engines --ignore-scripts --silent
    15. In dir webpack/test/cases/scope-hoisting/side-effects-11990-star, run yarn install --ignore-engines --ignore-scripts --silent
    16. In dir webpack/test/cases/scope-hoisting/side-effects-11990, run yarn install --ignore-engines --ignore-scripts --silent
    17. In dir webpack/test/cases/scope-hoisting/side-effects-9159/package, run yarn install --ignore-engines --ignore-scripts --silent
    18. In dir webpack/test/cases/side-effects/dynamic-reexports/dedupe-target-with-side, run yarn install --ignore-engines --ignore-scripts --silent
    19. In dir webpack/test/cases/side-effects/dynamic-reexports, run yarn install --ignore-engines --ignore-scripts --silent
    20. In dir webpack/test/cases/side-effects/issue-12071, run yarn install --ignore-engines --ignore-scripts --silent
    21. In dir webpack/test/cases/side-effects/issue-12570-second-try, run yarn install --ignore-engines --ignore-scripts --silent
    22. In dir webpack/test/cases/side-effects/issue-12570, run yarn install --ignore-engines --ignore-scripts --silent
    23. In dir webpack/test/cases/side-effects/missing-module-7499/example, run yarn install --ignore-engines --ignore-scripts --silent
    24. In dir webpack/test/cases/side-effects/order-issue-7665/module, run yarn install --ignore-engines --ignore-scripts --silent
    25. In dir webpack/test/cases/side-effects/wrong-module-10146/module, run yarn install --ignore-engines --ignore-scripts --silent
    26. In dir webpack/test/configCases/container/1-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    27. In dir webpack/test/configCases/container/2-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    28. In dir webpack/test/configCases/container/3-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    29. In dir webpack/test/configCases/container/exposed-overridables, run yarn install --ignore-engines --ignore-scripts --silent
    30. In dir webpack/test/configCases/ecmaVersion/browserslist-missing, run yarn install --ignore-engines --ignore-scripts --silent
    31. In dir webpack/test/configCases/ecmaVersion/browserslist, run yarn install --ignore-engines --ignore-scripts --silent
    32. In dir webpack/test/configCases/records/issue-2991/pkgs/somepackage, run yarn install --ignore-engines --ignore-scripts --silent
    33. In dir webpack/test/configCases/resolve-merging/override/package, run yarn install --ignore-engines --ignore-scripts --silent
    34. In dir webpack/test/configCases/resolve/context-resolve-with-ignore/a/foo, run yarn install --ignore-engines --ignore-scripts --silent
    35. In dir webpack/test/configCases/resolve/context-resolve-with-ignore/b/foo, run yarn install --ignore-engines --ignore-scripts --silent
    36. In dir webpack/test/configCases/sharing/consume-module, run yarn install --ignore-engines --ignore-scripts --silent
    37. In dir webpack/test/configCases/sharing/consume-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    38. In dir webpack/test/configCases/sharing/no-override-loaded, run yarn install --ignore-engines --ignore-scripts --silent
    39. In dir webpack/test/configCases/sharing/provide-eager-module, run yarn install --ignore-engines --ignore-scripts --silent
    40. In dir webpack/test/configCases/sharing/provide-module, run yarn install --ignore-engines --ignore-scripts --silent
    41. In dir webpack/test/configCases/sharing/provide-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    42. In dir webpack/test/configCases/sharing/share-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    43. In dir webpack/test/configCases/sharing/share-plugin, run yarn install --ignore-engines --ignore-scripts --silent
    44. In dir webpack/test/configCases/split-chunks/asnyc-entries, run yarn install --ignore-engines --ignore-scripts --silent
    45. In dir webpack/test/configCases/web/unique-jsonp, run yarn install --ignore-engines --ignore-scripts --silent
    46. In dir webpack/test/statsCases/ignore-warnings, run yarn install --ignore-engines --ignore-scripts --silent
    47. In dir webpack/test/statsCases/resolve-plugin-context, run yarn install --ignore-engines --ignore-scripts --silent
    48. In dir webpack/test/statsCases/side-effects-issue-7428/components, run yarn install --ignore-engines --ignore-scripts --silent
    49. In dir webpack/test/watchCases/side-effects/issue-7400/0/my-module, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults4/webpack.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./webpack ./webpack.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@andrewbranch
Copy link
Member Author

we were able to take shortcut that skips this search through the ExportInfoMap containing the faulty code

Actually, that shortcut is the other stack trace that shows up in the user tests. I suspect they’re different root causes, but maybe I’ll try to tackle that one too in this PR.

@andrewbranch
Copy link
Member Author

@typescript-bot user test tsserver
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 9, 2023

Heya @andrewbranch, I've started to run the perf test suite on this PR at 605b0d9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 9, 2023

Heya @andrewbranch, I've started to run the diff-based user code test suite (tsserver) on this PR at 605b0d9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@andrewbranch Here are the results of running the user test suite comparing main and refs/pull/52686/merge:

Something interesting changed - please have a look.

Details

npm

⚠️ Note that built also had errors ⚠️
Req #588 - completionEntryDetails
    at getImportFixForSymbol (/typescript-main/built/local/tsserver.js:141013:9)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:140990:34)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149107:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:148993:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:134907:35)
    at /typescript-main/built/local/tsserver.js:178466:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178464:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:176810:43)
    at /typescript-main/built/local/tsserver.js:179154:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179146:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179154:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179196:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180740:14)
Req #9708 - completionEntryDetails
    at Object.getImportCompletionAction (/typescript-52686/built/local/tsserver.js:140996:21)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149114:62)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:149000:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:134907:35)
    at /typescript-52686/built/local/tsserver.js:178474:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178472:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:176818:43)
    at /typescript-52686/built/local/tsserver.js:179162:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179154:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179162:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179204:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:180748:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults3/npm.rawError.txt in the artifact folder

Last few requests

{"seq":9705,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/utils/exit-handler.js","line":617,"offset":58,"entryNames":[{"name":"minimatch","source":"minimatch","data":{"exportName":"default","exportMapKey":"minimatch|42830|","moduleSpecifier":"minimatch","fileName":"/mnt/ts_downloads/npm/node_modules/minimatch/dist/cjs/index.d.ts"}}]}}
{"seq":9706,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/utils/exit-handler.js","line":617,"offset":58,"entryNames":[{"name":"Minimatch","source":"minimatch","data":{"exportName":"Minimatch","exportMapKey":"Minimatch|45660|","moduleSpecifier":"minimatch","fileName":"/mnt/ts_downloads/npm/node_modules/minimatch/dist/cjs/index.d.ts"}}]}}
{"seq":9707,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/utils/exit-handler.js","line":617,"offset":58,"entryNames":[{"name":"Minipass","source":"minipass","data":{"exportName":"export=","exportMapKey":"Minipass|28473|","moduleSpecifier":"minipass","fileName":"/mnt/ts_downloads/npm/node_modules/minipass/index.d.ts"}}]}}
{"seq":9708,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/utils/exit-handler.js","line":617,"offset":58,"entryNames":[{"name":"Minipass","source":"/mnt/ts_downloads/npm/node_modules/minipass-json-stream/node_modules/minipass/index","data":{"exportName":"export=","exportMapKey":"Minipass|45835|","fileName":"/mnt/ts_downloads/npm/node_modules/minipass-json-stream/node_modules/minipass/index.d.ts"}}]}}

Repro Steps

  1. git clone https://github.com/npm/cli.git --recurse-submodules
  2. In dir npm, run git reset --hard c606653399aa0dfc3526b52b75ccd0106c7ec1e2
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir npm/docs, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir npm/docs, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    3. In dir npm/mock-registry, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    4. In dir npm/mock-registry, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    5. In dir npm, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    6. In dir npm, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    7. In dir npm/smoke-tests, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    8. In dir npm/smoke-tests, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    9. In dir npm/workspaces/arborist, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    10. In dir npm/workspaces/arborist, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    11. In dir npm/workspaces/config, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    12. In dir npm/workspaces/config, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    13. In dir npm/workspaces/libnpmaccess, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    14. In dir npm/workspaces/libnpmaccess, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    15. In dir npm/workspaces/libnpmdiff, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    16. In dir npm/workspaces/libnpmdiff, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    17. In dir npm/workspaces/libnpmexec, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    18. In dir npm/workspaces/libnpmexec, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    19. In dir npm/workspaces/libnpmfund, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    20. In dir npm/workspaces/libnpmfund, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    21. In dir npm/workspaces/libnpmhook, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    22. In dir npm/workspaces/libnpmhook, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    23. In dir npm/workspaces/libnpmorg, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    24. In dir npm/workspaces/libnpmorg, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    25. In dir npm/workspaces/libnpmpack, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    26. In dir npm/workspaces/libnpmpack, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    27. In dir npm/workspaces/libnpmpublish, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    28. In dir npm/workspaces/libnpmpublish, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    29. In dir npm/workspaces/libnpmsearch, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    30. In dir npm/workspaces/libnpmsearch, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    31. In dir npm/workspaces/libnpmteam, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    32. In dir npm/workspaces/libnpmteam, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    33. In dir npm/workspaces/libnpmversion, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    34. In dir npm/workspaces/libnpmversion, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
  4. Back in the initial folder, download RepoResults3/npm.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./npm ./npm.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

webpack

⚠️ Note that built also had errors ⚠️
Req #1148 - completionEntryDetails
    at getImportFixForSymbol (/typescript-main/built/local/tsserver.js:141013:9)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:140990:34)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149107:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:148993:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:134907:35)
    at /typescript-main/built/local/tsserver.js:178466:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178464:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:176810:43)
    at /typescript-main/built/local/tsserver.js:179154:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179146:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179154:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179196:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:180740:14)
Req #8871 - completionEntryDetails
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149128:9)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:149000:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:134907:35)
    at /typescript-52686/built/local/tsserver.js:178474:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178472:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:176818:43)
    at /typescript-52686/built/local/tsserver.js:179162:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179154:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179162:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179204:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:180748:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/webpack.rawError.txt in the artifact folder

Last few requests

{"seq":8868,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"ExportPropertyLibraryPlugin","source":"/mnt/ts_downloads/webpack/lib/library/ExportPropertyLibraryPlugin","data":{"exportName":"export=","exportMapKey":"ExportPropertyLibraryPlugin|41315|","fileName":"/mnt/ts_downloads/webpack/lib/library/ExportPropertyLibraryPlugin.js"}}]}}
{"seq":8869,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"exports","source":"enhanced-resolve","data":{"exportName":"export=","exportMapKey":"exports|6993|","moduleSpecifier":"enhanced-resolve","fileName":"/mnt/ts_downloads/webpack/node_modules/enhanced-resolve/types.d.ts"}}]}}
{"seq":8870,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"exports","source":"../RuntimeGlobals","data":{"exportName":"exports","exportMapKey":"exports|12592|","moduleSpecifier":"../RuntimeGlobals","fileName":"/mnt/ts_downloads/webpack/lib/RuntimeGlobals.js"}}]}}
{"seq":8871,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"EXPORTS_OBJECT_REFERENCED","source":"../dependencies/LoaderDependency","data":{"exportName":"EXPORTS_OBJECT_REFERENCED","exportMapKey":"EXPORTS_OBJECT_REFERENCED|23878|","moduleSpecifier":"../dependencies/LoaderDependency","fileName":"/mnt/ts_downloads/webpack/lib/dependencies/LoaderDependency.js"}}]}}

Repro Steps

  1. git clone https://github.com/webpack/webpack.git --recurse-submodules
  2. In dir webpack, run git reset --hard b67626c7b4ffed8737d195b27c8cea1e68d58134
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir webpack, run yarn install --ignore-engines --ignore-scripts --silent
    2. In dir webpack/test/cases/entry-exports-field/imports, run yarn install --ignore-engines --ignore-scripts --silent
    3. In dir webpack/test/cases/entry-exports-field/self, run yarn install --ignore-engines --ignore-scripts --silent
    4. In dir webpack/test/cases/inner-graph/no-side-effects/package, run yarn install --ignore-engines --ignore-scripts --silent
    5. In dir webpack/test/cases/inner-graph/static-of-class/other, run yarn install --ignore-engines --ignore-scripts --silent
    6. In dir webpack/test/cases/loaders/issue-4959, run yarn install --ignore-engines --ignore-scripts --silent
    7. In dir webpack/test/cases/mjs/cjs-import-default, run yarn install --ignore-engines --ignore-scripts --silent
    8. In dir webpack/test/cases/mjs/namespace-object-lazy, run yarn install --ignore-engines --ignore-scripts --silent
    9. In dir webpack/test/cases/mjs/no-module-main-field, run yarn install --ignore-engines --ignore-scripts --silent
    10. In dir webpack/test/cases/mjs/type-module, run yarn install --ignore-engines --ignore-scripts --silent
    11. In dir webpack/test/cases/mjs/type-null, run yarn install --ignore-engines --ignore-scripts --silent
    12. In dir webpack/test/cases/parsing/harmony-export-import-specifier/side-effect-free, run yarn install --ignore-engines --ignore-scripts --silent
    13. In dir webpack/test/cases/parsing/harmony-star-conflict/named-with-namespace-no-side, run yarn install --ignore-engines --ignore-scripts --silent
    14. In dir webpack/test/cases/scope-hoisting/order-without-side-effects, run yarn install --ignore-engines --ignore-scripts --silent
    15. In dir webpack/test/cases/scope-hoisting/side-effects-11990-star, run yarn install --ignore-engines --ignore-scripts --silent
    16. In dir webpack/test/cases/scope-hoisting/side-effects-11990, run yarn install --ignore-engines --ignore-scripts --silent
    17. In dir webpack/test/cases/scope-hoisting/side-effects-9159/package, run yarn install --ignore-engines --ignore-scripts --silent
    18. In dir webpack/test/cases/side-effects/dynamic-reexports/dedupe-target-with-side, run yarn install --ignore-engines --ignore-scripts --silent
    19. In dir webpack/test/cases/side-effects/dynamic-reexports, run yarn install --ignore-engines --ignore-scripts --silent
    20. In dir webpack/test/cases/side-effects/issue-12071, run yarn install --ignore-engines --ignore-scripts --silent
    21. In dir webpack/test/cases/side-effects/issue-12570-second-try, run yarn install --ignore-engines --ignore-scripts --silent
    22. In dir webpack/test/cases/side-effects/issue-12570, run yarn install --ignore-engines --ignore-scripts --silent
    23. In dir webpack/test/cases/side-effects/missing-module-7499/example, run yarn install --ignore-engines --ignore-scripts --silent
    24. In dir webpack/test/cases/side-effects/order-issue-7665/module, run yarn install --ignore-engines --ignore-scripts --silent
    25. In dir webpack/test/cases/side-effects/wrong-module-10146/module, run yarn install --ignore-engines --ignore-scripts --silent
    26. In dir webpack/test/configCases/container/1-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    27. In dir webpack/test/configCases/container/2-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    28. In dir webpack/test/configCases/container/3-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    29. In dir webpack/test/configCases/container/exposed-overridables, run yarn install --ignore-engines --ignore-scripts --silent
    30. In dir webpack/test/configCases/ecmaVersion/browserslist-missing, run yarn install --ignore-engines --ignore-scripts --silent
    31. In dir webpack/test/configCases/ecmaVersion/browserslist, run yarn install --ignore-engines --ignore-scripts --silent
    32. In dir webpack/test/configCases/records/issue-2991/pkgs/somepackage, run yarn install --ignore-engines --ignore-scripts --silent
    33. In dir webpack/test/configCases/resolve-merging/override/package, run yarn install --ignore-engines --ignore-scripts --silent
    34. In dir webpack/test/configCases/resolve/context-resolve-with-ignore/a/foo, run yarn install --ignore-engines --ignore-scripts --silent
    35. In dir webpack/test/configCases/resolve/context-resolve-with-ignore/b/foo, run yarn install --ignore-engines --ignore-scripts --silent
    36. In dir webpack/test/configCases/sharing/consume-module, run yarn install --ignore-engines --ignore-scripts --silent
    37. In dir webpack/test/configCases/sharing/consume-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    38. In dir webpack/test/configCases/sharing/no-override-loaded, run yarn install --ignore-engines --ignore-scripts --silent
    39. In dir webpack/test/configCases/sharing/provide-eager-module, run yarn install --ignore-engines --ignore-scripts --silent
    40. In dir webpack/test/configCases/sharing/provide-module, run yarn install --ignore-engines --ignore-scripts --silent
    41. In dir webpack/test/configCases/sharing/provide-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    42. In dir webpack/test/configCases/sharing/share-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    43. In dir webpack/test/configCases/sharing/share-plugin, run yarn install --ignore-engines --ignore-scripts --silent
    44. In dir webpack/test/configCases/split-chunks/asnyc-entries, run yarn install --ignore-engines --ignore-scripts --silent
    45. In dir webpack/test/configCases/web/unique-jsonp, run yarn install --ignore-engines --ignore-scripts --silent
    46. In dir webpack/test/statsCases/ignore-warnings, run yarn install --ignore-engines --ignore-scripts --silent
    47. In dir webpack/test/statsCases/resolve-plugin-context, run yarn install --ignore-engines --ignore-scripts --silent
    48. In dir webpack/test/statsCases/side-effects-issue-7428/components, run yarn install --ignore-engines --ignore-scripts --silent
    49. In dir webpack/test/watchCases/side-effects/issue-7400/0/my-module, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults4/webpack.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./webpack ./webpack.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@andrewbranch andrewbranch marked this pull request as draft February 9, 2023 01:17
@andrewbranch andrewbranch changed the title Consider module symbol in completion details exportInfo lookup Fix completion details auto-imports crashes Feb 9, 2023
@typescript-bot
Copy link
Collaborator

@andrewbranch
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..52686
Metric main 52686 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 359,848k (± 0.02%) 359,878k (± 0.02%) ~ 359,779k 360,004k p=0.689 n=6
Parse Time 3.92s (± 0.81%) 3.93s (± 1.33%) ~ 3.86s 4.00s p=0.685 n=6
Bind Time 1.17s (± 0.88%) 1.18s (± 0.64%) ~ 1.17s 1.19s p=0.351 n=6
Check Time 8.71s (± 0.36%) 8.73s (± 0.36%) ~ 8.69s 8.77s p=0.376 n=6
Emit Time 7.64s (± 1.05%) 7.60s (± 0.81%) ~ 7.54s 7.71s p=0.295 n=6
Total Time 21.44s (± 0.35%) 21.44s (± 0.34%) ~ 21.36s 21.56s p=1.000 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 196,110k (± 1.54%) 194,147k (± 1.52%) ~ 192,122k 197,970k p=0.378 n=6
Parse Time 1.62s (± 1.50%) 1.65s (± 1.37%) ~ 1.61s 1.67s p=0.062 n=6
Bind Time 0.80s (± 0.65%) 0.80s (± 0.65%) ~ 0.79s 0.80s p=1.000 n=6
Check Time 9.74s (± 0.80%) 9.75s (± 0.56%) ~ 9.68s 9.81s p=0.520 n=6
Emit Time 2.80s (± 0.77%) 2.80s (± 0.44%) ~ 2.78s 2.81s p=0.742 n=6
Total Time 14.94s (± 0.57%) 14.99s (± 0.39%) ~ 14.92s 15.07s p=0.336 n=6
Monaco - node (v18.10.0, x64)
Memory used 343,978k (± 0.01%) 343,961k (± 0.01%) ~ 343,899k 344,006k p=0.471 n=6
Parse Time 2.93s (± 0.82%) 2.91s (± 0.81%) ~ 2.88s 2.94s p=0.227 n=6
Bind Time 1.03s (± 1.13%) 1.04s (± 0.94%) ~ 1.03s 1.05s p=0.157 n=6
Check Time 7.06s (± 0.69%) 7.07s (± 0.42%) ~ 7.02s 7.10s p=0.688 n=6
Emit Time 4.32s (± 0.61%) 4.31s (± 0.79%) ~ 4.28s 4.37s p=0.331 n=6
Total Time 15.34s (± 0.48%) 15.33s (± 0.25%) ~ 15.27s 15.37s p=0.810 n=6
TFS - node (v18.10.0, x64)
Memory used 300,373k (± 0.01%) 300,364k (± 0.01%) ~ 300,330k 300,396k p=0.471 n=6
Parse Time 2.27s (± 0.83%) 2.27s (± 1.40%) ~ 2.24s 2.31s p=1.000 n=6
Bind Time 1.17s (± 0.54%) 1.17s (± 0.64%) ~ 1.16s 1.18s p=0.718 n=6
Check Time 6.54s (± 0.45%) 6.56s (± 0.30%) ~ 6.54s 6.59s p=0.516 n=6
Emit Time 3.91s (± 0.90%) 3.92s (± 0.72%) ~ 3.88s 3.96s p=0.568 n=6
Total Time 13.89s (± 0.35%) 13.92s (± 0.44%) ~ 13.86s 14.02s p=0.253 n=6
material-ui - node (v18.10.0, x64)
Memory used 476,785k (± 0.01%) 476,784k (± 0.01%) ~ 476,743k 476,816k p=1.000 n=6
Parse Time 3.53s (± 0.31%) 3.51s (± 1.09%) ~ 3.46s 3.56s p=0.361 n=6
Bind Time 0.98s (± 1.40%) 0.96s (± 0.87%) ~ 0.96s 0.98s p=0.109 n=6
Check Time 17.27s (± 0.76%) 17.16s (± 0.57%) ~ 17.08s 17.33s p=0.107 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.78s (± 0.63%) 21.64s (± 0.55%) ~ 21.53s 21.85s p=0.092 n=6
xstate - node (v18.10.0, x64)
Memory used 548,964k (± 0.02%) 549,061k (± 0.03%) ~ 548,837k 549,309k p=0.378 n=6
Parse Time 4.56s (± 0.51%) 4.56s (± 0.43%) ~ 4.53s 4.58s p=0.871 n=6
Bind Time 1.72s (± 0.80%) 1.72s (± 0.80%) ~ 1.69s 1.73s p=0.788 n=6
Check Time 2.82s (± 0.67%) 2.82s (± 0.66%) ~ 2.79s 2.84s p=0.808 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=0.405 n=6
Total Time 9.19s (± 0.36%) 9.17s (± 0.30%) ~ 9.13s 9.21s p=0.376 n=6
Angular - node (v16.17.1, x64)
Memory used 359,227k (± 0.01%) 359,232k (± 0.01%) ~ 359,202k 359,253k p=0.810 n=6
Parse Time 4.16s (± 0.36%) 4.17s (± 0.43%) ~ 4.14s 4.19s p=0.188 n=6
Bind Time 1.24s (± 0.42%) 1.24s (± 0.41%) ~ 1.24s 1.25s p=0.069 n=6
Check Time 9.48s (± 0.24%) 9.49s (± 0.52%) ~ 9.44s 9.58s p=0.808 n=6
Emit Time 8.03s (± 0.45%) 8.06s (± 0.69%) ~ 8.00s 8.16s p=0.295 n=6
Total Time 22.91s (± 0.20%) 22.97s (± 0.34%) ~ 22.85s 23.07s p=0.198 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,808k (± 0.07%) 194,417k (± 0.77%) ~ 193,665k 197,452k p=1.000 n=6
Parse Time 1.80s (± 0.76%) 1.80s (± 1.40%) ~ 1.77s 1.84s p=0.558 n=6
Bind Time 0.84s (± 0.61%) 0.84s (± 0.61%) ~ 0.84s 0.85s p=1.000 n=6
Check Time 10.45s (± 0.47%) 10.45s (± 0.79%) ~ 10.34s 10.57s p=0.872 n=6
Emit Time 3.12s (± 4.30%) 3.11s (± 4.75%) ~ 3.02s 3.41s p=0.570 n=6
Total Time 16.22s (± 0.77%) 16.20s (± 0.96%) ~ 16.05s 16.45s p=0.810 n=6
Monaco - node (v16.17.1, x64)
Memory used 343,223k (± 0.00%) 343,220k (± 0.01%) ~ 343,195k 343,270k p=0.629 n=6
Parse Time 3.13s (± 1.50%) 3.10s (± 0.64%) ~ 3.07s 3.13s p=0.333 n=6
Bind Time 1.11s (± 0.57%) 1.12s (± 0.46%) ~ 1.11s 1.12s p=0.091 n=6
Check Time 7.74s (± 0.28%) 7.73s (± 0.52%) ~ 7.68s 7.79s p=0.290 n=6
Emit Time 4.53s (± 0.79%) 4.53s (± 0.86%) ~ 4.49s 4.60s p=1.000 n=6
Total Time 16.50s (± 0.46%) 16.47s (± 0.43%) ~ 16.39s 16.60s p=0.335 n=6
TFS - node (v16.17.1, x64)
Memory used 299,709k (± 0.00%) 299,705k (± 0.01%) ~ 299,688k 299,726k p=0.689 n=6
Parse Time 2.47s (± 1.60%) 2.47s (± 1.92%) ~ 2.42s 2.53s p=0.685 n=6
Bind Time 1.26s (± 0.60%) 1.25s (± 0.65%) ~ 1.24s 1.26s p=0.120 n=6
Check Time 7.19s (± 0.30%) 7.20s (± 0.33%) ~ 7.17s 7.23s p=0.687 n=6
Emit Time 4.23s (± 0.81%) 4.21s (± 0.85%) ~ 4.16s 4.26s p=0.419 n=6
Total Time 15.15s (± 0.39%) 15.13s (± 0.25%) ~ 15.08s 15.18s p=0.422 n=6
material-ui - node (v16.17.1, x64)
Memory used 476,021k (± 0.00%) 476,016k (± 0.00%) ~ 475,996k 476,028k p=0.689 n=6
Parse Time 3.67s (± 0.32%) 3.67s (± 0.49%) ~ 3.65s 3.70s p=1.000 n=6
Bind Time 1.02s (± 0.51%) 1.02s (± 0.40%) ~ 1.01s 1.02s p=0.595 n=6
Check Time 18.20s (± 0.44%) 18.38s (± 1.26%) ~ 18.23s 18.84s p=0.054 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.89s (± 0.33%) 23.07s (± 0.96%) +0.18s (+ 0.80%) 22.94s 23.52s p=0.025 n=6
xstate - node (v16.17.1, x64)
Memory used 546,684k (± 0.02%) 546,751k (± 0.03%) ~ 546,592k 547,032k p=0.810 n=6
Parse Time 4.76s (± 0.21%) 4.76s (± 0.22%) ~ 4.75s 4.78s p=0.452 n=6
Bind Time 1.85s (± 0.22%) 1.84s (± 0.57%) ~ 1.83s 1.86s p=0.528 n=6
Check Time 3.05s (± 0.46%) 3.07s (± 0.60%) ~ 3.05s 3.10s p=0.076 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 5.53%) ~ 0.09s 0.10s p=0.174 n=6
Total Time 9.76s (± 0.22%) 9.77s (± 0.24%) ~ 9.74s 9.80s p=0.373 n=6
Angular - node (v14.15.1, x64)
Memory used 352,826k (± 0.03%) 352,824k (± 0.03%) ~ 352,584k 352,897k p=0.810 n=6
Parse Time 4.24s (± 0.65%) 4.22s (± 0.51%) ~ 4.20s 4.26s p=0.285 n=6
Bind Time 1.27s (± 0.92%) 1.28s (± 0.77%) ~ 1.26s 1.29s p=0.245 n=6
Check Time 9.73s (± 0.31%) 9.75s (± 0.75%) ~ 9.67s 9.82s p=1.000 n=6
Emit Time 8.48s (± 3.08%) 8.44s (± 2.80%) ~ 8.31s 8.92s p=0.334 n=6
Total Time 23.72s (± 1.05%) 23.69s (± 0.95%) ~ 23.46s 24.12s p=1.000 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 189,318k (± 0.67%) 188,701k (± 0.01%) ~ 188,666k 188,735k p=0.810 n=6
Parse Time 1.83s (± 0.46%) 1.82s (± 0.41%) ~ 1.81s 1.83s p=0.432 n=6
Bind Time 0.87s (± 0.87%) 0.86s (± 0.94%) ~ 0.86s 0.88s p=0.206 n=6
Check Time 10.51s (± 0.29%) 10.55s (± 0.33%) ~ 10.49s 10.58s p=0.076 n=6
Emit Time 3.36s (± 3.94%) 3.45s (± 1.03%) ~ 3.42s 3.52s p=0.296 n=6
Total Time 16.56s (± 0.75%) 16.69s (± 0.23%) +0.12s (+ 0.73%) 16.63s 16.74s p=0.037 n=6
Monaco - node (v14.15.1, x64)
Memory used 337,989k (± 0.00%) 338,000k (± 0.00%) ~ 337,981k 338,013k p=0.128 n=6
Parse Time 3.18s (± 0.46%) 3.19s (± 0.57%) ~ 3.17s 3.21s p=0.367 n=6
Bind Time 1.11s (± 0.68%) 1.11s (± 0.93%) ~ 1.10s 1.13s p=0.931 n=6
Check Time 8.07s (± 0.42%) 8.07s (± 0.42%) ~ 8.03s 8.12s p=0.687 n=6
Emit Time 4.78s (± 0.33%) 4.80s (± 0.68%) ~ 4.78s 4.86s p=0.243 n=6
Total Time 17.13s (± 0.20%) 17.18s (± 0.32%) ~ 17.13s 17.28s p=0.147 n=6
TFS - node (v14.15.1, x64)
Memory used 294,568k (± 0.01%) 294,567k (± 0.01%) ~ 294,543k 294,617k p=0.688 n=6
Parse Time 2.73s (± 0.76%) 2.74s (± 0.27%) ~ 2.73s 2.75s p=0.155 n=6
Bind Time 1.10s (± 0.94%) 1.12s (± 0.73%) +0.01s (+ 1.21%) 1.11s 1.13s p=0.039 n=6
Check Time 7.53s (± 0.38%) 7.55s (± 0.53%) ~ 7.49s 7.59s p=0.329 n=6
Emit Time 4.63s (± 0.71%) 4.65s (± 0.53%) ~ 4.62s 4.68s p=0.292 n=6
Total Time 15.99s (± 0.29%) 16.05s (± 0.25%) +0.06s (+ 0.40%) 16.01s 16.12s p=0.044 n=6
material-ui - node (v14.15.1, x64)
Memory used 471,609k (± 0.00%) 471,607k (± 0.00%) ~ 471,582k 471,645k p=0.873 n=6
Parse Time 3.88s (± 0.92%) 3.87s (± 0.69%) ~ 3.83s 3.90s p=0.373 n=6
Bind Time 1.05s (± 0.72%) 1.05s (± 0.00%) ~ 1.05s 1.05s p=0.598 n=6
Check Time 19.16s (± 0.71%) 19.11s (± 0.38%) ~ 19.05s 19.24s p=0.378 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 24.10s (± 0.51%) 24.03s (± 0.35%) ~ 23.96s 24.18s p=0.297 n=6
xstate - node (v14.15.1, x64)
Memory used 534,731k (± 0.01%) 534,724k (± 0.00%) ~ 534,700k 534,739k p=0.810 n=6
Parse Time 5.09s (± 0.63%) 5.11s (± 0.56%) ~ 5.08s 5.15s p=0.122 n=6
Bind Time 1.71s (± 0.44%) 1.71s (± 0.32%) ~ 1.70s 1.71s p=0.137 n=6
Check Time 3.13s (± 0.63%) 3.13s (± 0.48%) ~ 3.12s 3.16s p=0.935 n=6
Emit Time 0.10s (± 0.00%) 0.10s (± 0.00%) ~ 0.10s 0.10s p=1.000 n=6
Total Time 10.04s (± 0.45%) 10.06s (± 0.40%) ~ 10.02s 10.11s p=0.375 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 52686 6
Baseline main 6

TSServer

Comparison Report - main..52686
Metric main 52686 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,489ms (± 1.22%) 2,502ms (± 1.54%) ~ 2,453ms 2,545ms p=0.521 n=6
Req 2 - geterr 5,559ms (± 0.74%) 5,540ms (± 0.48%) ~ 5,513ms 5,582ms p=0.378 n=6
Req 3 - references 367ms (± 1.08%) 369ms (± 0.94%) ~ 364ms 373ms p=0.277 n=6
Req 4 - navto 284ms (± 0.53%) 284ms (± 0.62%) ~ 282ms 287ms p=0.402 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 74ms (± 1.14%) 72ms (± 1.85%) -2ms (- 2.27%) 70ms 74ms p=0.032 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,761ms (± 0.59%) 2,749ms (± 0.97%) ~ 2,706ms 2,789ms p=0.471 n=6
Req 2 - geterr 4,074ms (± 0.52%) 4,068ms (± 0.55%) ~ 4,039ms 4,096ms p=0.630 n=6
Req 3 - references 369ms (± 0.36%) 368ms (± 0.82%) ~ 363ms 371ms p=0.745 n=6
Req 4 - navto 293ms (± 0.56%) 291ms (± 0.34%) ~ 290ms 292ms p=0.209 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 67ms (± 3.57%) 67ms (± 4.45%) ~ 65ms 73ms p=0.933 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,491ms (± 0.54%) 3,501ms (± 0.64%) ~ 3,476ms 3,536ms p=0.688 n=6
Req 2 - geterr 1,656ms (± 0.72%) 1,654ms (± 0.91%) ~ 1,631ms 1,673ms p=1.000 n=6
Req 3 - references 104ms (± 1.45%) 105ms (± 1.04%) ~ 103ms 106ms p=0.095 n=6
Req 4 - navto 359ms (± 2.06%) 358ms (± 0.83%) ~ 354ms 363ms p=0.872 n=6
Req 5 - completionInfo count 3,175 (± 0.00%) 3,175 (± 0.00%) ~ 3,175 3,175 p=1.000 n=6
Req 5 - completionInfo 449ms (± 0.31%) 451ms (± 1.19%) ~ 444ms 458ms p=0.469 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,765ms (± 0.86%) 2,761ms (± 0.94%) ~ 2,742ms 2,811ms p=0.748 n=6
Req 2 - geterr 5,922ms (± 0.58%) 5,919ms (± 0.54%) ~ 5,880ms 5,954ms p=0.936 n=6
Req 3 - references 379ms (± 1.32%) 374ms (± 0.85%) ~ 371ms 380ms p=0.126 n=6
Req 4 - navto 277ms (± 0.71%) 279ms (± 0.70%) ~ 276ms 282ms p=0.120 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 79ms (± 4.89%) 83ms (± 4.56%) ~ 78ms 87ms p=0.163 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,910ms (± 1.07%) 2,943ms (± 0.39%) +33ms (+ 1.12%) 2,927ms 2,961ms p=0.045 n=6
Req 2 - geterr 4,424ms (± 0.44%) 4,431ms (± 0.62%) ~ 4,393ms 4,465ms p=0.748 n=6
Req 3 - references 380ms (± 0.99%) 383ms (± 0.78%) ~ 377ms 385ms p=0.106 n=6
Req 4 - navto 286ms (± 0.51%) 287ms (± 0.42%) ~ 286ms 289ms p=0.103 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 71ms (± 0.57%) 72ms (± 1.05%) ~ 71ms 73ms p=0.100 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,622ms (± 0.60%) 3,629ms (± 0.34%) ~ 3,611ms 3,643ms p=0.298 n=6
Req 2 - geterr 1,826ms (± 1.22%) 1,825ms (± 1.11%) ~ 1,788ms 1,840ms p=1.000 n=6
Req 3 - references 112ms (± 2.56%) 113ms (± 1.45%) ~ 110ms 115ms p=1.000 n=6
Req 4 - navto 341ms (± 1.13%) 344ms (± 2.18%) ~ 338ms 357ms p=0.374 n=6
Req 5 - completionInfo count 3,175 (± 0.00%) 3,175 (± 0.00%) ~ 3,175 3,175 p=1.000 n=6
Req 5 - completionInfo 455ms (± 1.13%) 457ms (± 0.55%) ~ 453ms 460ms p=0.170 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,897ms (± 0.47%) 2,884ms (± 0.46%) ~ 2,863ms 2,905ms p=0.173 n=6
Req 2 - geterr 6,326ms (± 0.99%) 6,314ms (± 0.76%) ~ 6,259ms 6,387ms p=0.810 n=6
Req 3 - references 393ms (± 0.55%) 391ms (± 0.87%) ~ 387ms 396ms p=0.260 n=6
Req 4 - navto 283ms (± 2.42%) 283ms (± 2.07%) ~ 277ms 290ms p=0.936 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 94ms (±10.85%) 95ms (± 6.06%) ~ 88ms 101ms p=0.628 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,055ms (± 0.93%) 3,039ms (± 0.56%) ~ 3,016ms 3,055ms p=0.471 n=6
Req 2 - geterr 4,718ms (± 0.44%) 4,727ms (± 0.27%) ~ 4,709ms 4,743ms p=0.575 n=6
Req 3 - references 406ms (± 0.75%) 402ms (± 0.88%) ~ 399ms 408ms p=0.124 n=6
Req 4 - navto 293ms (± 1.66%) 295ms (± 1.60%) ~ 291ms 303ms p=0.871 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 83ms (± 5.29%) 81ms (± 4.09%) ~ 79ms 88ms p=0.934 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,951ms (± 0.52%) 3,930ms (± 0.85%) ~ 3,896ms 3,975ms p=0.199 n=6
Req 2 - geterr 1,795ms (± 1.88%) 1,814ms (± 1.47%) ~ 1,785ms 1,850ms p=0.336 n=6
Req 3 - references 131ms (± 3.05%) 130ms (± 2.57%) ~ 125ms 133ms p=0.872 n=6
Req 4 - navto 375ms (± 0.39%) 375ms (± 0.46%) ~ 373ms 378ms p=0.935 n=6
Req 5 - completionInfo count 3,175 (± 0.00%) 3,175 (± 0.00%) ~ 3,175 3,175 p=1.000 n=6
Req 5 - completionInfo 468ms (± 1.19%) 472ms (± 2.10%) ~ 460ms 484ms p=0.688 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
Benchmark Name Iterations
Current 52686 6
Baseline main 6

Startup

Comparison Report - main..52686
Metric main 52686 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.46ms (± 0.20%) 142.55ms (± 0.20%) +0.08ms (+ 0.06%) 141.67ms 146.37ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 227.74ms (± 0.42%) 228.85ms (± 0.47%) +1.11ms (+ 0.49%) 225.93ms 236.86ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 229.15ms (± 0.32%) 229.15ms (± 0.28%) ~ 227.46ms 235.00ms p=0.073 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 209.63ms (± 0.28%) 209.98ms (± 0.25%) +0.35ms (+ 0.17%) 208.40ms 215.41ms p=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 52686 6
Baseline main 6

Developer Information:

Download Benchmark

@andrewbranch
Copy link
Member Author

@typescript-bot user test tsserver

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 10, 2023

Heya @andrewbranch, I've started to run the diff-based user code test suite (tsserver) on this PR at 6c85f52. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@andrewbranch Here are the results of running the user test suite comparing main and refs/pull/52686/merge:

Something interesting changed - please have a look.

Details

npm

⚠️ Note that built also had errors ⚠️
Req #588 - completionEntryDetails
    at getImportFixForSymbol (/typescript-main/built/local/tsserver.js:141449:9)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:141426:34)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149543:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:149429:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:135343:35)
    at /typescript-main/built/local/tsserver.js:178902:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178900:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:177246:43)
    at /typescript-main/built/local/tsserver.js:179590:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179582:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179590:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179632:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:181176:14)
Req #10098 - completionEntryDetails
    at Object.getImportCompletionAction (/typescript-52686/built/local/tsserver.js:141432:21)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149550:62)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:149436:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:135343:35)
    at /typescript-52686/built/local/tsserver.js:178910:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178908:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:177254:43)
    at /typescript-52686/built/local/tsserver.js:179598:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179590:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179598:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179640:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:181184:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults3/npm.rawError.txt in the artifact folder

Last few requests

{"seq":10095,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/commands/ls.js","line":819,"offset":1,"entryNames":[{"name":"METHODS","source":"http","data":{"exportName":"METHODS","exportMapKey":"METHODS|7343|http","moduleSpecifier":"http","ambientModuleName":"http"}}]}}
{"seq":10096,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/commands/ls.js","line":819,"offset":1,"entryNames":[{"name":"MIMEParams","source":"util","data":{"exportName":"MIMEParams","exportMapKey":"MIMEParams|7846|util","moduleSpecifier":"util","ambientModuleName":"util"}}]}}
{"seq":10097,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/commands/ls.js","line":819,"offset":1,"entryNames":[{"name":"MIMEType","source":"util","data":{"exportName":"MIMEType","exportMapKey":"MIMEType|7845|util","moduleSpecifier":"util","ambientModuleName":"util"}}]}}
{"seq":10098,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/test/lib/commands/ls.js","line":819,"offset":1,"entryNames":[{"name":"Minipass","source":"/mnt/ts_downloads/npm/node_modules/minipass-json-stream/node_modules/minipass/index","data":{"exportName":"export=","exportMapKey":"Minipass|28469|","fileName":"/mnt/ts_downloads/npm/node_modules/minipass-json-stream/node_modules/minipass/index.d.ts"}}]}}

Repro Steps

  1. git clone https://github.com/npm/cli.git --recurse-submodules
  2. In dir npm, run git reset --hard c606653399aa0dfc3526b52b75ccd0106c7ec1e2
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir npm/docs, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir npm/docs, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    3. In dir npm/mock-registry, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    4. In dir npm/mock-registry, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    5. In dir npm, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    6. In dir npm, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    7. In dir npm/smoke-tests, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    8. In dir npm/smoke-tests, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    9. In dir npm/workspaces/arborist, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    10. In dir npm/workspaces/arborist, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    11. In dir npm/workspaces/config, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    12. In dir npm/workspaces/config, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    13. In dir npm/workspaces/libnpmaccess, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    14. In dir npm/workspaces/libnpmaccess, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    15. In dir npm/workspaces/libnpmdiff, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    16. In dir npm/workspaces/libnpmdiff, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    17. In dir npm/workspaces/libnpmexec, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    18. In dir npm/workspaces/libnpmexec, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    19. In dir npm/workspaces/libnpmfund, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    20. In dir npm/workspaces/libnpmfund, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    21. In dir npm/workspaces/libnpmhook, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    22. In dir npm/workspaces/libnpmhook, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    23. In dir npm/workspaces/libnpmorg, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    24. In dir npm/workspaces/libnpmorg, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    25. In dir npm/workspaces/libnpmpack, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    26. In dir npm/workspaces/libnpmpack, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    27. In dir npm/workspaces/libnpmpublish, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    28. In dir npm/workspaces/libnpmpublish, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    29. In dir npm/workspaces/libnpmsearch, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    30. In dir npm/workspaces/libnpmsearch, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    31. In dir npm/workspaces/libnpmteam, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    32. In dir npm/workspaces/libnpmteam, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
    33. In dir npm/workspaces/libnpmversion, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    34. In dir npm/workspaces/libnpmversion, run npm install @types/node --no-save --ignore-scripts --legacy-peer-deps
  4. Back in the initial folder, download RepoResults3/npm.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./npm ./npm.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

webpack

⚠️ Note that built also had errors ⚠️
Req #1148 - completionEntryDetails
    at getImportFixForSymbol (/typescript-main/built/local/tsserver.js:141449:9)
    at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:141426:34)
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149543:62)
    at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:149429:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:135343:35)
    at /typescript-main/built/local/tsserver.js:178902:43
    at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:178900:20)
    at completionEntryDetails (/typescript-main/built/local/tsserver.js:177246:43)
    at /typescript-main/built/local/tsserver.js:179590:69
    at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179582:14)
    at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179590:29)
    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179632:51)
    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:181176:14)
Req #8871 - completionEntryDetails
    at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-52686/built/local/tsserver.js:149564:9)
    at Object.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:149436:46)
    at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-52686/built/local/tsserver.js:135343:35)
    at /typescript-52686/built/local/tsserver.js:178910:43
    at mapDefined (/typescript-52686/built/local/tsserver.js:2627:22)
    at IOSession.getCompletionEntryDetails (/typescript-52686/built/local/tsserver.js:178908:20)
    at completionEntryDetails (/typescript-52686/built/local/tsserver.js:177254:43)
    at /typescript-52686/built/local/tsserver.js:179598:69
    at IOSession.executeWithRequestId (/typescript-52686/built/local/tsserver.js:179590:14)
    at IOSession.executeCommand (/typescript-52686/built/local/tsserver.js:179598:29)
    at IOSession.onMessage (/typescript-52686/built/local/tsserver.js:179640:51)
    at Interface.<anonymous> (/typescript-52686/built/local/tsserver.js:181184:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/webpack.rawError.txt in the artifact folder

Last few requests

{"seq":8868,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"ExportPropertyLibraryPlugin","source":"/mnt/ts_downloads/webpack/lib/library/ExportPropertyLibraryPlugin","data":{"exportName":"export=","exportMapKey":"ExportPropertyLibraryPlugin|41315|","fileName":"/mnt/ts_downloads/webpack/lib/library/ExportPropertyLibraryPlugin.js"}}]}}
{"seq":8869,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"exports","source":"enhanced-resolve","data":{"exportName":"export=","exportMapKey":"exports|6993|","moduleSpecifier":"enhanced-resolve","fileName":"/mnt/ts_downloads/webpack/node_modules/enhanced-resolve/types.d.ts"}}]}}
{"seq":8870,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"exports","source":"../RuntimeGlobals","data":{"exportName":"exports","exportMapKey":"exports|12592|","moduleSpecifier":"../RuntimeGlobals","fileName":"/mnt/ts_downloads/webpack/lib/RuntimeGlobals.js"}}]}}
{"seq":8871,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/lib/javascript/JavascriptParser.js","line":465,"offset":42,"entryNames":[{"name":"EXPORTS_OBJECT_REFERENCED","source":"../dependencies/LoaderDependency","data":{"exportName":"EXPORTS_OBJECT_REFERENCED","exportMapKey":"EXPORTS_OBJECT_REFERENCED|23878|","moduleSpecifier":"../dependencies/LoaderDependency","fileName":"/mnt/ts_downloads/webpack/lib/dependencies/LoaderDependency.js"}}]}}

Repro Steps

  1. git clone https://github.com/webpack/webpack.git --recurse-submodules
  2. In dir webpack, run git reset --hard b67626c7b4ffed8737d195b27c8cea1e68d58134
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir webpack, run yarn install --ignore-engines --ignore-scripts --silent
    2. In dir webpack/test/cases/entry-exports-field/imports, run yarn install --ignore-engines --ignore-scripts --silent
    3. In dir webpack/test/cases/entry-exports-field/self, run yarn install --ignore-engines --ignore-scripts --silent
    4. In dir webpack/test/cases/inner-graph/no-side-effects/package, run yarn install --ignore-engines --ignore-scripts --silent
    5. In dir webpack/test/cases/inner-graph/static-of-class/other, run yarn install --ignore-engines --ignore-scripts --silent
    6. In dir webpack/test/cases/loaders/issue-4959, run yarn install --ignore-engines --ignore-scripts --silent
    7. In dir webpack/test/cases/mjs/cjs-import-default, run yarn install --ignore-engines --ignore-scripts --silent
    8. In dir webpack/test/cases/mjs/namespace-object-lazy, run yarn install --ignore-engines --ignore-scripts --silent
    9. In dir webpack/test/cases/mjs/no-module-main-field, run yarn install --ignore-engines --ignore-scripts --silent
    10. In dir webpack/test/cases/mjs/type-module, run yarn install --ignore-engines --ignore-scripts --silent
    11. In dir webpack/test/cases/mjs/type-null, run yarn install --ignore-engines --ignore-scripts --silent
    12. In dir webpack/test/cases/parsing/harmony-export-import-specifier/side-effect-free, run yarn install --ignore-engines --ignore-scripts --silent
    13. In dir webpack/test/cases/parsing/harmony-star-conflict/named-with-namespace-no-side, run yarn install --ignore-engines --ignore-scripts --silent
    14. In dir webpack/test/cases/scope-hoisting/order-without-side-effects, run yarn install --ignore-engines --ignore-scripts --silent
    15. In dir webpack/test/cases/scope-hoisting/side-effects-11990-star, run yarn install --ignore-engines --ignore-scripts --silent
    16. In dir webpack/test/cases/scope-hoisting/side-effects-11990, run yarn install --ignore-engines --ignore-scripts --silent
    17. In dir webpack/test/cases/scope-hoisting/side-effects-9159/package, run yarn install --ignore-engines --ignore-scripts --silent
    18. In dir webpack/test/cases/side-effects/dynamic-reexports/dedupe-target-with-side, run yarn install --ignore-engines --ignore-scripts --silent
    19. In dir webpack/test/cases/side-effects/dynamic-reexports, run yarn install --ignore-engines --ignore-scripts --silent
    20. In dir webpack/test/cases/side-effects/issue-12071, run yarn install --ignore-engines --ignore-scripts --silent
    21. In dir webpack/test/cases/side-effects/issue-12570-second-try, run yarn install --ignore-engines --ignore-scripts --silent
    22. In dir webpack/test/cases/side-effects/issue-12570, run yarn install --ignore-engines --ignore-scripts --silent
    23. In dir webpack/test/cases/side-effects/missing-module-7499/example, run yarn install --ignore-engines --ignore-scripts --silent
    24. In dir webpack/test/cases/side-effects/order-issue-7665/module, run yarn install --ignore-engines --ignore-scripts --silent
    25. In dir webpack/test/cases/side-effects/wrong-module-10146/module, run yarn install --ignore-engines --ignore-scripts --silent
    26. In dir webpack/test/configCases/container/1-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    27. In dir webpack/test/configCases/container/2-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    28. In dir webpack/test/configCases/container/3-container-full, run yarn install --ignore-engines --ignore-scripts --silent
    29. In dir webpack/test/configCases/container/exposed-overridables, run yarn install --ignore-engines --ignore-scripts --silent
    30. In dir webpack/test/configCases/ecmaVersion/browserslist-missing, run yarn install --ignore-engines --ignore-scripts --silent
    31. In dir webpack/test/configCases/ecmaVersion/browserslist, run yarn install --ignore-engines --ignore-scripts --silent
    32. In dir webpack/test/configCases/records/issue-2991/pkgs/somepackage, run yarn install --ignore-engines --ignore-scripts --silent
    33. In dir webpack/test/configCases/resolve-merging/override/package, run yarn install --ignore-engines --ignore-scripts --silent
    34. In dir webpack/test/configCases/resolve/context-resolve-with-ignore/a/foo, run yarn install --ignore-engines --ignore-scripts --silent
    35. In dir webpack/test/configCases/resolve/context-resolve-with-ignore/b/foo, run yarn install --ignore-engines --ignore-scripts --silent
    36. In dir webpack/test/configCases/sharing/consume-module, run yarn install --ignore-engines --ignore-scripts --silent
    37. In dir webpack/test/configCases/sharing/consume-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    38. In dir webpack/test/configCases/sharing/no-override-loaded, run yarn install --ignore-engines --ignore-scripts --silent
    39. In dir webpack/test/configCases/sharing/provide-eager-module, run yarn install --ignore-engines --ignore-scripts --silent
    40. In dir webpack/test/configCases/sharing/provide-module, run yarn install --ignore-engines --ignore-scripts --silent
    41. In dir webpack/test/configCases/sharing/provide-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    42. In dir webpack/test/configCases/sharing/share-multiple-versions, run yarn install --ignore-engines --ignore-scripts --silent
    43. In dir webpack/test/configCases/sharing/share-plugin, run yarn install --ignore-engines --ignore-scripts --silent
    44. In dir webpack/test/configCases/split-chunks/asnyc-entries, run yarn install --ignore-engines --ignore-scripts --silent
    45. In dir webpack/test/configCases/web/unique-jsonp, run yarn install --ignore-engines --ignore-scripts --silent
    46. In dir webpack/test/statsCases/ignore-warnings, run yarn install --ignore-engines --ignore-scripts --silent
    47. In dir webpack/test/statsCases/resolve-plugin-context, run yarn install --ignore-engines --ignore-scripts --silent
    48. In dir webpack/test/statsCases/side-effects-issue-7428/components, run yarn install --ignore-engines --ignore-scripts --silent
    49. In dir webpack/test/watchCases/side-effects/issue-7400/0/my-module, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults4/webpack.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./webpack ./webpack.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@andrewbranch
Copy link
Member Author

Hm, my last commit fixed the npm repro I was able to get locally. Not sure what’s going on there now.

@andrewbranch andrewbranch marked this pull request as ready for review February 10, 2023 20:03
@andrewbranch
Copy link
Member Author

I can’t repro those last two crashes locally, so I’m giving up on them for now. This fixes the large majority of the ones reported at #52660.

});

verify.applyCodeActionFromCompletion("", {
}).andApplyCodeAction({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new fourslash API for calling completionEntryDetails with the exact data that was returned in the completionInfo response, as an editor would do. I was considering making sending data for auto-import completion details requests mandatory, breaking super old editors and about 40 old tests like this one, but ultimately decided against it.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from airplane wifi :D

const getChecker = createGetChecker(program, host);
return getExportInfoMap(importingFile, host, program, preferences, cancellationToken)
.search(importingFile.path, preferCapitalized, name => name === symbolName, info => {
if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol) {
if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol && info.some(i => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't recall but I think our own utility for checking if something is in an array is faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Completion entry details on re-export in fs-extra causes assertion failure ("some exportInfo should match...")
4 participants