Skip to content

Simpler visitor functions, performance and test fixes

Compare
Choose a tag to compare
@jfmengels jfmengels released this 20 Jun 16:23

Simpler visitor functions

As a mean to replace withExpressionVisitor and withDeclarationVisitor that have a cumbersome Direction argument and which causes a lot of unnecessary evaluations for a majority of cases (we usually don't care about the "exit" case), there are now 4 for additional visitor variants:

The withExpressionVisitor and withDeclarationVisitor visitors are from here on deprecated. In the next major version, they will be replaced by their Enter variant which will take their name.

I hereby encourage everyone to use these new functions which should be faster than the ones they are replacing.

This was discussed in #13 and improved thanks to @sparksp's suggestions.

Performance

We now avoid recomputing the elm.json, README and dependencies visitors if they didn't change and the result of the previous visitor gave the same result. This should make watch mode and fixes faster.

Bug fixes

  • There were a few problems with test failure messages, thanks @zwilias for reporting them and investigating.