Skip to content

Use relative module specifiers in error messages if possible - #27441

Merged
Wesley Wigham (weswigham) merged 3 commits into
microsoft:masterfrom
weswigham:relativeize-module-name-errors
Oct 8, 2018
Merged

Wesley Wigham (weswigham) merged 3 commits into
microsoft:masterfrom
weswigham:relativeize-module-name-errors

Conversation

@weswigham

Copy link
Copy Markdown
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.

Comment thread src/compiler/types.ts Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Ryan Cavanaugh (@RyanCavanaugh) wanna update your review?

@weswigham
Wesley Wigham (weswigham) merged commit b85e9e1 into microsoft:master Oct 8, 2018
@weswigham
Wesley Wigham (weswigham) deleted the relativeize-module-name-errors branch October 8, 2018 21:36
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants