Skip to content

Remove secondary reference lookup implementation #32016

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

Merged
merged 2 commits into from
Jun 21, 2019

Conversation

weswigham
Copy link
Member

Fixes #15738

I didn't even know it was soft deprecated (or that another option existed) and was using it in the declaration emitter 🤷‍♂

@@ -725,7 +725,8 @@ namespace ts {
fileExists: f => host.fileExists(f),
directoryExists: host.directoryExists && (f => host.directoryExists!(f)),
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
getProgramBuildInfo: returnUndefined
getProgramBuildInfo: returnUndefined,
getSourceFileFromReference: returnUndefined, // TODO: Implement?
Copy link
Member

Choose a reason for hiding this comment

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

Should this be notImplemented. As this is just writing existing texts by updating prepend outputs.

Copy link
Member Author

Choose a reason for hiding this comment

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

notImplemented causes a crash, since the method is actually used in the declaration emitter. Previously it would have relied on getSourceFile which is a returnUndefined, so using returnUndefined means the behavior hasn't changed.

Copy link
Member

@sheetalkamat sheetalkamat Jun 21, 2019

Choose a reason for hiding this comment

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

I see. Then it should be as you have returnUndefined since this emit is not going to recalculate the refs. Also since getSourceFile and getSourceFileByPath are returnUndefined as well. (I meant no TODO needed)

@weswigham weswigham merged commit 1cbace6 into microsoft:master Jun 21, 2019
@weswigham weswigham deleted the remove-secondary-impl branch June 21, 2019 20:26
Copy link

@mjd0 mjd0 left a comment

Choose a reason for hiding this comment

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

1cbace6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove tryResolveScriptReference
3 participants