Uh oh!
There was an error while loading. Please reload this page.
Do not report errors when inference is partially blocked - #52728
Conversation
| const isDecorator = node.kind === SyntaxKind.Decorator; | ||
| const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); | ||
| const reportErrors = !candidatesOutArray; | ||
| const reportErrors = !isInferencePartiallyBlocked && !candidatesOutArray; |
There was a problem hiding this comment.
alternatively, we could check checkMode but ContextFlags.Completions isn't currently passed down as any kind of checkMode (whereas CheckMode.IsForStringLiteralArgumentCompletions already exists). So this would require some additional plumbing and I'm not sure if that's desired
| goTo.marker("1"); | ||
| verify.completions({ exact: undefined }); | ||
| verify.noErrors(); |
There was a problem hiding this comment.
this was reporting excess property check - I still think that perhaps it shouldn't cause applicability error in this case when requesting completions but that's a separate problem
| goTo.marker("1"); | ||
| const markerPosition = test.markers()[0].position; | ||
| edit.paste(`bar: { fn: (a: string, b) => {}, thing: "asd" },`) | ||
| edit.replace(markerPosition + 4, 1, 'z') | ||
| verify.completions({ isNewIdentifierLocation: true }); | ||
| verify.noErrors(); |
There was a problem hiding this comment.
This was an interesting case because the whole argument got blocked and thus A and B were replaced with their constraints and thus typing the argument Funcs<unknown, Record<string, unknown>>. And then the argument became not assignable to this target type - see the playground here
| } | ||
| isInferencePartiallyBlocked = true; | ||
| const result = fn(); | ||
| isInferencePartiallyBlocked = false; |
There was a problem hiding this comment.
Is this reentrant such that you should save the value and restore it, rather than unconditionally setting false?
There was a problem hiding this comment.
I intentionally ignored this to keep the implementation simpler as I dont think it is
TypeScript Bot (@typescript-bot) pack this |
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based top-repos suite (tsserver) on this PR at dbd8664. You can monitor the build here. |
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based user code test suite (tsserver) on this PR at dbd8664. You can monitor the build here. |
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at dbd8664. You can monitor the build here. |
Andrew Branch (andrewbranch)
commented
Feb 14, 2023
This looks good to me, but will wait until our extended tests work again to approve 🥲 |
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Hey Daniel Rosenwasser (@DanielRosenwasser), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running |
Jake Bailey (jakebailey)
commented
Feb 16, 2023
The test stuff is working again, but this PR has a conflict now so I don't know if they'd actually give the right results. |
…sts-with-blocked-inference # Conflicts: # src/compiler/checker.ts
Mateusz Burzyński (Andarist)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) conflicts resolved |
Jake Bailey (jakebailey)
commented
Feb 16, 2023
TypeScript Bot (@typescript-bot) test this |
Heya Jake Bailey (@jakebailey), I've started to run the perf test suite on this PR at 92ec29e. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the extended test suite on this PR at 92ec29e. You can monitor the build here. |
Heya Jake Bailey (@jakebailey), I've started to run the tarball bundle task on this PR at 92ec29e. You can monitor the build here. |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based top-repos suite on this PR at 92ec29e. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the parallelized Definitely Typed test suite on this PR at 92ec29e. You can monitor the build here. |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite (tsserver) on this PR at 92ec29e. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite on this PR at 92ec29e. You can monitor the build here. Update: The results are in! |
Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing Everything looks good! |
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Heya Jake Bailey (@jakebailey), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing Everything looks good! |
Jake Bailey (jakebailey)
commented
Feb 16, 2023
Just to check my understanding, this silences the errors, but is it possible that information related to those errors persists in some cache? |
Mateusz Burzyński (Andarist)
commented
Feb 16, 2023
This silences error reporting but before |
Jake Bailey (jakebailey)
left a comment
There was a problem hiding this comment.
I think I thought that we'd leave stuff around in relation checking, but, I guess that's not actually a problem.
Mateusz Burzyński (Andarist)
commented
Feb 16, 2023
Ye, if I understand correctly the relationship cache is stable~ since it just caches the results of comparing A and B but that's totally unrelated to where those A and B are coming from. |
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are the results of running the top-repos suite comparing Everything looks good! |
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are the results of running the top-repos suite comparing Something interesting changed - please have a look. Detailsangular/angular-cli
|
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are some more interesting changes from running the top-repos suite Detailsionic-team/ionic-framework
|
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are some more interesting changes from running the top-repos suite Detailspnpm/pnpm
|
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here are some more interesting changes from running the top-repos suite Detailstrpc/trpc
|
TypeScript Bot (typescript-bot)
commented
Feb 16, 2023
Jake Bailey (@jakebailey) Here they are:CompilerComparison Report - main..52728
System
Hosts
Scenarios
TSServerComparison Report - main..52728
System
Hosts
Scenarios
StartupComparison Report - main..52728
System
Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fixes#50818
sort of supersedes #52393
cc Andrew Branch (@andrewbranch)Wesley Wigham (@weswigham)