Skip to content

Bump tasty-hedgehog #540

@brprice

Description

@brprice

In #349 we attempt to bump the version of tasty-hedgehog, but it required a bunch of extra workarounds. We decided to wait until various upstreams have cut new releases so we don't have to maintain various hacks. See #349 (comment)_

Probably most of these workarounds will be temporary, but how temporary?

I would expect that they will all be removed when both hlint and hls make new releases. However, this requires hlint to release first and hls to bump their vendored hlint. Since the community is moving slowly wrt adopting ghc 9.2.3 this may take quite a while.

We're not currently held back in any significant way by the our version of tasty-hedgehog, so these additional workarounds that we've added in this PR are harder to justify,

Agreed

On a related note: how did we end up forking/hacking HLS and/or hlint in this PR? It's just supposed to be bumping tasty-hedgehog, right? Are the changes to hlint and HLS required to support the new tasty-hedgehog version, or are they unrelated and just happened to be added to this PR as part of a general cleanup of developer tooling issues, or is it the case that the changes required for the new tasty-hedgehog have snowballed and we've ended up at this point?

I have serious concerns about trying to keep the shell's hlint, HLS's hlint, and pre-commit-hook's hlint all in sync, and I would like to understand why that is now necessary, given that it has not been necessary to date.

Ok. We don't necessarily need the exact same binary, or even the exact same version. However, different versions can give different warnings, giving an inconsistent dev environment and CI.

For background on why this was necessary, see #349 (comment) and the commit messages in #349. To summarise

  • We are attempting to upgrade tasty-hedgehog, just as a routine version bump to track upstream
  • There was an upstream change deprecating testProperty and introducing testPropertyNamed
  • If we just upgrade tasty-hedgehog, then everything will work, but we will get a lot of deprecation warnings from GHC (which are errors in CI)
    • This is because tasty-discover looks for hprop_... tests and generates tasty tests containing testPropertyNamed for them
  • There is a recommended change to avoid this, requiring a newer tasty-discover: use custom tasty_... tests
  • However, hlint has a warning about camelcasing. Upstream has got a commit on master that updates the hardcoded list of things to ignore for that hint to include tasty_, but there has not been a release yet. If we don't upgrade hlint we would get a lot of warnings about these names, which make CI fail
  • Thus we want to upgrade hlint to HEAD. Since we use 3 separate instances of hlint, we need to upgrade them all. We don't need to keep them perfectly in sync, but do need to upgrade all of them to a recent-enough HEAD (technically we only need to update pre-commit-hooks to avoid CI erroring, but for consistency and not overwhelming local development with these reports we update the other two also). These instances are
    • shell's hlint: what gets run manually
    • hls: this bundles its own copy of hlint, so needs updating separately
    • pre-commit-hook: this is run in CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions