Default fileLookup to {} instead of null.#233
Merged
rwjblue merged 2 commits intoember-cli-code-coverage:masterfrom Feb 11, 2020
Merged
Default fileLookup to {} instead of null.#233rwjblue merged 2 commits intoember-cli-code-coverage:masterfrom
rwjblue merged 2 commits intoember-cli-code-coverage:masterfrom
Conversation
rwjblue
requested changes
Jan 29, 2020
index.js
Outdated
| const EXT_RE = /\.[^\.]+$/; | ||
|
|
||
| let fileLookup = null; | ||
| let fileLookup = {}; |
Collaborator
There was a problem hiding this comment.
Hmm, I actually think that #182 was not the right path forward here. Keeping this in module scope means we don't support running multiple projects within the same process.
Can you tweak things to instead revert the changes in #182 (which will bring back this.fileLookup) and then initialize it in init? It will have the same basic result as this PR does now (and fix the issue that #182 was also trying to fix), but will avoid that downside...
Author
There was a problem hiding this comment.
Makes total sense, done. Can you please take another look?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Attempt to fix #232.
See a detailed description and analysis of the issue in #232.
The idea is to default
fileLookupto{}instead ofnullthis way regardless of the fact thatincludedwill run or notfileLookupshould always be non-null.I'm not 100% sure if this is the best fix for this issue. The issue may be elsewhere in the addons system. I'll leave the reviewer(s) weigh in on this.