elm-review/CHANGELOG.md
2023-04-17 14:04:46 +02:00

13 KiB

Changelog

2.13.0 - 2023-04-16

  1. Changed the order in which rules are applied on modules. #153

Instead of visiting the entire project for each rule sequentially, we now visit the entire project once but apply each rule on each module. This should hopefully result in a small speed improvement, and make it more interesting to precompute interesting information to provide the rules (such as the module name lookup table)

  1. Made it less costly to compute whether cached analysis can be reused #154

The caching mechanism introduced in 2.11.0 felt inefficient. It improved the performance a bit but not as significantly as expected. The reason for that was that the method to check whether a cached analysis could be re-used or not was extremely inefficient. Changing the representation of that key vastly improved the performance of the whole cache system, which now feels worth it.

  1. Applying fixes for all targets #155

In 2.10.0 the package introduced the ability to apply fixes on its own, without the need of the CLI. It did however not support applying fixes for the elm.json file, as that can have important repercussions on the analysis (if source-directories or dependencies are changed). These fixes are now applied as well.

Applying all fixes in the package means that there is no need to try and apply fixes in the CLI, which will be removed in its v2.10.0. The CLI was responsible for annotating fixes as failing, which is why this release introduces Review.Rule.errorFixFailure to allow the CLI to show when a fix failed to apply.

2.12.2 - 2023-02-02

Fixed a bug where errors were skipped/ignored when running elm-review after having run elm-review --fix-all #150

2.12.1 - 2023-01-25

Fixed a bug where rules would report false positives in the presence of the file-system cache.

2.12.0 - 2023-01-22

Fixed a bug that ignored fixes from rules that were not marked as providing fixes (using Rule.providesFixesFor*Rule). This was meant to be handled by the CLI, but didn't work as expected.

When the rule uses Review.Rule.withIsFileIgnored, the test runner will now attempt to re-run the rule while ignoring some files (it will do so for every possible combination) and assert that the results are the same. This is to check that the knowledge is only used for performance improvements and change the result. This way, complex rules can avoid writing extremely complicated test setups to test that complex scenarios work behave as expected even when some files are ignored.

Some rules might not wish for this behavior, in which case Review.Test.ignoredFilesImpactResults can be used to opt out of this re-running mechanism.

2.11.1 - 2022-12-20

2.11.0 - 2022-12-17

  • Adds Review.Rule.withIsFileIgnored (#145)
  • Behind the scenes work to allow the CLI to save the internal result cache to the file system. Adds as an internal function Review.Rule.withRuleId for that purpose.
  • Fixed the test failure message reported when a test was missing an expected extract (it reported the failure message for a different problem).

2.10.0 - 2022-11-08

Faster fixes

Includes a large rework of the internals to include fixes (instead of in the CLI) which results in much faster fixes. See the announcement blog post on the topic.

Breaking change (in the sense that tests will fail): Rules that provide fixes now have to indicate that they will do so, by using Rule.providesFixesForModuleRule or Rule.providesFixesForProjectRule.

Extract feature

Rules can now include a "data extractor" using Rule.withDataExtractor, which allows you to extract information from a project if you run elm-review --extract --report=json. See the "Extract information" section in the README for more information.

New testing functions

The testing API provided in Review.Test worked well, but in cases where you had to report multiple different things, for instance errors for modules + global errors, then you would have to switch to using expectGlobalAndModuleErrors. If you reported local errors + global errors, you would have to use expectGlobalAndLocalErrors, and so on.

With the addition of data extracts, this approach would require a few new functions, because we'd need a combination of all the possible things a rule would report for any given test.

Since this looked like a combinatorial explosion, we are now switching to a different approach. The two functions I just mentioned are now deprecated, and some new functions are introduced to replace them using a more flexible approach, center around the new Review.Test.expect function.

2.9.2 - 2022-10-12

Bumps the dependency to elm-explorations/test to v2. We recommend upgrading by using elm-json, like this:

cd review/
elm-json upgrade

2.9.1 - 2022-09-19

This release contains HUGE performance updates. elm-review should now run quite a bit faster (rough estimate says 50%).

2.9.0 - 2022-08-23

2.8.1 - 2022-07-17

2.8.0 - 2022-07-05

2.7.2 - 2022-04-26

2.7.1 - 2022-03-18

2.7.0 - 2022-02-04

Missing changelog

Help would be appreciated to fill the blanks!