Skip to content

Use relative module specifiers in error messages if possible #27441

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

Conversation

weswigham
Copy link
Member

Fixes #25747

We don't create node module specifiers since within the checker during checking because we don't really have access to the FS to do the fileExists and readFile calls to check if a given possible representation is valid. Naturally, if it seems it's necessary (ie, we dislike ./node_modules/foo/bar in errors enough) we can rig something up to pass them through from the compiler host.

@@ -3183,6 +3183,8 @@ namespace ts {
InTypeAlias = 1 << 23, // Writing type in type alias declaration
InInitialEntityName = 1 << 24, // Set when writing the LHS of an entity name or entity name expression
InReverseMappedType = 1 << 25,

/* @internal */ DoNotIncludeSymbolChain = 1 << 25, // Skip looking up and printing an accessible symbol chain
Copy link
Member

Choose a reason for hiding this comment

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

This has the same value as the one above it?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦 yes, yes it does.

@weswigham
Copy link
Member Author

@RyanCavanaugh wanna update your review?

@weswigham weswigham merged commit b85e9e1 into microsoft:master Oct 8, 2018
@weswigham weswigham deleted the relativeize-module-name-errors branch October 8, 2018 21:36
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.

2 participants