mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Do not invalidate the cache when a module gets ignored but the rule doesn't use that knowledge
This commit is contained in:
parent
1a7b199e78
commit
bb3906a090
@ -42,11 +42,11 @@ errors (ModuleEntry entry) =
|
||||
entry.errors
|
||||
|
||||
|
||||
match : ContentHash -> ContextHash context -> ModuleEntry error context -> { isFileIgnored : Bool } -> Bool
|
||||
match contentHash context (ModuleEntry entry) { isFileIgnored } =
|
||||
match : ContentHash -> ContextHash context -> ModuleEntry error context -> { isFileIgnored : Bool, rulesCareAboutIgnoredFiles : Bool } -> Bool
|
||||
match contentHash context (ModuleEntry entry) { isFileIgnored, rulesCareAboutIgnoredFiles } =
|
||||
ContentHash.areEqual contentHash entry.contentHash
|
||||
&& ContextHash.areEqual context entry.inputContext
|
||||
&& (isFileIgnored == entry.isFileIgnored)
|
||||
&& (not rulesCareAboutIgnoredFiles || isFileIgnored == entry.isFileIgnored)
|
||||
|
||||
|
||||
{-| Variant where the content may be absent
|
||||
|
@ -5073,6 +5073,9 @@ computeModuleAndCacheResult dataToComputeModules inputProjectContext moduleZippe
|
||||
projectContext =
|
||||
computeProjectContext dataToComputeModules.projectVisitor.traversalAndFolder project moduleContexts incoming inputProjectContext
|
||||
|
||||
(RequestedData requestedData) =
|
||||
dataToComputeModules.projectVisitor.requestedData
|
||||
|
||||
isFileIgnored : Bool
|
||||
isFileIgnored =
|
||||
Exceptions.isFileWeWantReportsFor dataToComputeModules.exceptions module_.path
|
||||
@ -5085,6 +5088,7 @@ computeModuleAndCacheResult dataToComputeModules inputProjectContext moduleZippe
|
||||
(ContextHash.create projectContext)
|
||||
cacheEntry
|
||||
{ isFileIgnored = isFileIgnored
|
||||
, rulesCareAboutIgnoredFiles = requestedData.ignoredFiles
|
||||
}
|
||||
)
|
||||
(Dict.get module_.path moduleContexts)
|
||||
|
Loading…
Reference in New Issue
Block a user