8000 Print namespaces earlier · codemuse-app/scip-python@e61f73a · GitHub
[go: up one dir, main page]

Skip to content

Commit e61f73a

Browse files
Print namespaces earlier
1 parent 3cd22f2 commit e61f73a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/pyright-scip/src/symbols.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ParseNode } from 'pyright-internal/parser/parseNodes';
22
import { Counter } from './lsif-typescript/Counter';
33
import {
4+
descriptorString,
45
metaDescriptor,
56
methodDescriptor,
67
packageDescriptor,
@@ -74,7 +75,17 @@ export function makeMethod(parent: ScipSymbol, name: string): ScipSymbol {
7475
}
7576

7677
export function makeType(parent: ScipSymbol, name: string): ScipSymbol {
77-
return ScipSymbol.global(parent, typeDescriptor(name));
78+
const desc = typeDescriptor(name);
79+
const descString = descriptorString(desc);
80+
if (descString.indexOf('SuchNestedMuchWow') !== -1) {
81+
throw new Error(
82+
'Got problematic descriptor with owner: ' +
83+
parent.value +
84+
', namespaces: ' +
85+
JSON.stringify(Object.fromEntries(namespaces))
86+
);
87+
}
88+
return ScipSymbol.global(parent, desc);
7889
}
7990

8091
export function makeTerm(parent: ScipSymbol, name: string): ScipSymbol {

0 commit comments

Comments
 (0)
0