-
Notifications
You must be signed in to change notification settings - Fork 200
Add support for NumericUnderscores extensions from CLI/config #1618
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
Open
9999years
wants to merge
1
commit into
ndmitchell:master
Choose a base branch
from
MercuryTechnologies:numeric-underscores
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the provenance of these extensions is in
ParseFlags
. This is not passed to hints themselves.The type of
DeclHint
is:If we want to propagate this information, we have essentially three choices:
ModuleEx
.Scope
.hlint
configuration (ParseFlags
? and[Setting]
maybe?)Scope
is, already, just a convenience/performance/cache wrapper around information that is extracted directly from the contents of aModuleEx
. Here is definition and logic to create.I think one could argue that
Scope
is a more reasonable place for this thanModuleEx
, but I'd go further:Scope
should be part ofModuleEx
directly. After all,scopeCreate
is called on theModuleEx
- which means that we have already lost theParseFlags
information, if it is not present onModuleEx
.IMO, a
ModuleEx
represents "what we know about a parsed module":But we don't know - what extensions were enabled while parsing this module?
I think "rearchitecting the way we pass flags around in
hlint
and breaking the whole API for hints" is probably not appropriate for this PR. If we extendModuleEx
, then we pave the way for further additions toModuleEx
as "the" place to put information relevant to a module. If we extendScope
, then we need to plumb that through anyway, possibly throughModuleEx
resulting in duplication. But neither option prevent or impede a more serious refactoring in how this code works.