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

Assert in addIndirectUser in FAR in microsoft/playwright #50867

Closed
amcasey opened this issue Sep 20, 2022 · 1 comment · Fixed by #50905
Closed

Assert in addIndirectUser in FAR in microsoft/playwright #50867

amcasey opened this issue Sep 20, 2022 · 1 comment · Fixed by #50905
Assignees
Labels
Bug A bug in TypeScript Crawler-Detected Detected by a crawler running random TSServer operations on public code. Domain: Auto-import Fix Available A PR has been opened for this issue

Comments

@amcasey
Copy link
Member

amcasey commented Sep 20, 2022

microsoft/playwright the file being passed to addIndirectUser is here. The assert is that isAvailableThroughGlobal is false, which it's not because debug is exported globally here.

Originally posted by @amcasey in #50835 (comment)

@amcasey
Copy link
Member Author

amcasey commented Sep 20, 2022

microsoft/playwright

⚠️ Note that typescript-4.8.3 also had errors ⚠️
Req #6501 - references
    at addIndirectUser (/typescript-4.8.3/lib/tsserver.js:138032:26)
    at handleDirectImports (/typescript-4.8.3/lib/tsserver.js:137990:37)
    at getImportersForExport (/typescript-4.8.3/lib/tsserver.js:137912:13)
    at State.importTracker (/typescript-4.8.3/lib/tsserver.js:137888:26)
    at State.getImportSearches (/typescript-4.8.3/lib/tsserver.js:139444:33)
    at searchForImportsOfExport (/typescript-4.8.3/lib/tsserver.js:139493:32)
    at getImportOrExportReferences (/typescript-4.8.3/lib/tsserver.js:139986:21)
    at getReferencesAtLocation (/typescript-4.8.3/lib/tsserver.js:139906:17)
    at getReferencesInContainer (/typescript-4.8.3/lib/tsserver.js:139840:21)
    at getReferencesInContainerOrFiles (/typescript-4.8.3/lib/tsserver.js:139339:21)
    at getReferencedSymbolsForSymbol (/typescript-4.8.3/lib/tsserver.js:139330:21)
    at getReferencedSymbolsForModuleIfDeclaredBySourceFile (/typescript-4.8.3/lib/tsserver.js:139147:67)
    at Object.getReferencedSymbolsForNode (/typescript-4.8.3/lib/tsserver.js:139073:40)
    at Object.findReferencedSymbols (/typescript-4.8.3/lib/tsserver.js:138661:42)
    at Object.findReferences (/typescript-4.8.3/lib/tsserver.js:167440:41)
    at /typescript-4.8.3/lib/tsserver.js:177595:53
    at searchPosition (/typescript-4.8.3/lib/tsserver.js:177792:38)
    at getPerProjectReferences (/typescript-4.8.3/lib/tsserver.js:177760:42)
    at getReferencesWorker (/typescript-4.8.3/lib/tsserver.js:177592:37)
    at IOSession.Session.getReferences (/typescript-4.8.3/lib/tsserver.js:179195:34)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/typescript-4.8.3/lib/tsserver.js:178032:61)
    at /typescript-4.8.3/lib/tsserver.js:180166:96
    at IOSession.Session.executeWithRequestId (/typescript-4.8.3/lib/tsserver.js:180157:28)
    at IOSession.Session.executeCommand (/typescript-4.8.3/lib/tsserver.js:180166:41)
    at IOSession.Session.onMessage (/typescript-4.8.3/lib/tsserver.js:180194:35)
    at Interface.<anonymous> (/typescript-4.8.3/lib/tsserver.js:184330:31)
Req #6501 - references
    at addIndirectUser (/typescript-4.9.0-dev.20220918/lib/tsserver.js:139048:26)
    at handleDirectImports (/typescript-4.9.0-dev.20220918/lib/tsserver.js:139006:37)
    at getImportersForExport (/typescript-4.9.0-dev.20220918/lib/tsserver.js:138928:13)
    at State.importTracker (/typescript-4.9.0-dev.20220918/lib/tsserver.js:138904:26)
    at State.getImportSearches (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140462:33)
    at searchForImportsOfExport (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140511:32)
    at getImportOrExportReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:141004:21)
    at getReferencesAtLocation (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140924:17)
    at getReferencesInContainer (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140858:21)
    at getReferencesInContainerOrFiles (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140357:21)
    at getReferencedSymbolsForSymbol (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140348:21)
    at getReferencedSymbolsForModuleIfDeclaredBySourceFile (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140165:67)
    at Object.getReferencedSymbolsForNode (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140091:40)
    at Object.findReferencedSymbols (/typescript-4.9.0-dev.20220918/lib/tsserver.js:139679:42)
    at Object.findReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:168560:41)
    at /typescript-4.9.0-dev.20220918/lib/tsserver.js:178715:53
    at searchPosition (/typescript-4.9.0-dev.20220918/lib/tsserver.js:178912:38)
    at getPerProjectReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:178880:42)
    at getReferencesWorker (/typescript-4.9.0-dev.20220918/lib/tsserver.js:178712:37)
    at IOSession.Session.getReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:180315:34)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/typescript-4.9.0-dev.20220918/lib/tsserver.js:179152:61)
    at /typescript-4.9.0-dev.20220918/lib/tsserver.js:181286:96
    at IOSession.Session.executeWithRequestId (/typescript-4.9.0-dev.20220918/lib/tsserver.js:181277:28)
    at IOSession.Session.executeCommand (/typescript-4.9.0-dev.20220918/lib/tsserver.js:181286:41)
    at IOSession.Session.onMessage (/typescript-4.9.0-dev.20220918/lib/tsserver.js:181314:35)
    at Interface.<anonymous> (/typescript-4.9.0-dev.20220918/lib/tsserver.js:185436:31)

Last few requests

{"seq":6498,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":6,"offset":32,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":2,"triggerCharacter":" "}}
{"seq":6499,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":20,"offset":7,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":2,"triggerCharacter":" "}}
{"seq":6500,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":21,"offset":66}}
{"seq":6501,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":21,"offset":66}}

Repro Steps

  1. git clone https://github.com/microsoft/playwright --recurse-submodule
  2. In dir playwright, run git reset --hard ee83694372e2cd8a03131c042189a5359504f1b6
  3. Install packages (exact steps below, but probably easier to follow repo readme)
    1. In dir playwright/examples/components-vue, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    2. In dir playwright/examples/github-api, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    3. In dir playwright/examples/mock-battery, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    4. In dir playwright/examples/mock-filesystem, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    5. In dir playwright/examples/svgomg, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    6. In dir playwright/examples/todomvc, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    7. In dir playwright, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    8. In dir playwright/packages/html-reporter, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    9. In dir playwright/packages/playwright-chromium, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    10. In dir playwright/packages/playwright-core/bundles/utils, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    11. In dir playwright/packages/playwright-core/bundles/zip, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    12. In dir playwright/packages/playwright-core, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    13. In dir playwright/packages/playwright-ct-react, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    14. In dir playwright/packages/playwright-ct-solid, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    15. In dir playwright/packages/playwright-ct-svelte, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    16. In dir playwright/packages/playwright-ct-vue, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    17. In dir playwright/packages/playwright-ct-vue2, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    18. In dir playwright/packages/playwright-firefox, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    19. In dir playwright/packages/playwright-test/bundles/babel, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    20. In dir playwright/packages/playwright-test/bundles/expect, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    21. In dir playwright/packages/playwright-test/bundles/utils, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    22. In dir playwright/packages/playwright-test, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    23. In dir playwright/packages/playwright-webkit, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    24. In dir playwright/packages/playwright, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    25. In dir playwright/packages/recorder, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    26. In dir playwright/packages/trace-viewer, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    27. In dir playwright/tests/components/ct-react-vite, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    28. In dir playwright/tests/components/ct-react, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    29. In dir playwright/tests/components/ct-solid, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    30. In dir playwright/tests/components/ct-svelte-vite, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    31. In dir playwright/tests/components/ct-svelte, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    32. In dir playwright/tests/components/ct-vue-cli, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    33. In dir playwright/tests/components/ct-vue-vite, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    34. In dir playwright/tests/components/ct-vue2-cli, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    35. In dir playwright/tests/playwright-test/stable-test-runner, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    36. In dir playwright/utils/flakiness-dashboard, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
  4. Download RepoResults1/microsoft.playwright.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./playwright ./microsoft.playwright.replay.txt path/to/tsserver.js

@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.9.1 milestone Sep 21, 2022
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Auto-import Crawler-Detected Detected by a crawler running random TSServer operations on public code. labels Sep 21, 2022
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Crawler-Detected Detected by a crawler running random TSServer operations on public code. Domain: Auto-import Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants