Allow singleline string writer to be recursively used#18297
Conversation
|
some lint failures though. |
| "vue-class-component.d.ts": `import Vue from "./vue"; | ||
| export function Component(x: Config): any;` | ||
| }; | ||
| it("should be able to create a language service which can respond to deinition requests without throwing", () => { |
There was a problem hiding this comment.
It's not clear from reading this test that this has anything to do with stringwriter -- could you use a smaller repro?
There was a problem hiding this comment.
Not really, no. The repro occurs in trying to print the symbol for the reference for go to definition, which requires the module symbol the containing type is from be aliased cross-file for the repro to occur. Like, it probably doesn't have to explicitly be a decorator and a class in the root file; but it wouldn't cut out much making it into a call expression.
There was a problem hiding this comment.
The problem is that the above paragraph isn't clear from a test that just says should be able to create a language service which can respond to deinition requests without throwing -- we already have lots of tests for definition requests that don't throw! Could you add a comment at least?
#16751 made the single line string writer exclusive, however it is possible for
symbolToStringto be called during an invocation ofsymbolToString(eg, to report diagnostics). This just saves and restores the string writer's state when it is called into, rather than debug failing on a lock.Fixes #18245.