This change tries to apply fixes from errors found in the result cache. That means that even if we reuse the cache for a given module, we will try to find fixes. This is annoying for performance, but (so far at least) necessary because when the cache comes directly from the file system, we have never gone through the errors.
Basically, this PR solves the following issue:
$ elm-review --fix-all
# Found 10 fixable errors
<exit before accepting the fix>
$ elm-review --fix-all
I found no issues.
While developing this change, I created additional bugs because I forgot to update the ContentHash in ProjectModule (which happen to never cause problems, I think, before this change). To prevent this from happening again, I made ProjectModule opaque.
This change tries to apply fixes from errors found in the result cache. That means that even if we reuse the cache for a given module, we will try to find fixes. This is annoying for performance, but (so far at least) necessary because when the cache comes directly from the file system, we have never gone through the errors.
Basically, this PR solves the following issue:
While developing this change, I created additional bugs because I forgot to update the
ContentHash
inProjectModule
(which happen to never cause problems, I think, before this change). To prevent this from happening again, I madeProjectModule
opaque.