Skip to content

Allow singleline string writer to be recursively used#18297

Merged
weswigham merged 3 commits into
microsoft:masterfrom
weswigham:vue-debug-failure
Sep 7, 2017
Merged

Allow singleline string writer to be recursively used#18297
weswigham merged 3 commits into
microsoft:masterfrom
weswigham:vue-debug-failure

Conversation

@weswigham

Copy link
Copy Markdown
Member

#16751 made the single line string writer exclusive, however it is possible for symbolToString to be called during an invocation of symbolToString (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.

@mhegazy

mhegazy commented Sep 7, 2017

Copy link
Copy Markdown
Contributor

some lint failures though.

@weswigham weswigham merged commit 5c779b1 into microsoft:master Sep 7, 2017
"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", () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's not clear from reading this test that this has anything to do with stringwriter -- could you use a smaller repro?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will do

@weswigham weswigham deleted the vue-debug-failure branch September 7, 2017 16:51
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants