Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fourmolu 0.13 #3662

Merged
merged 4 commits into from
Jun 15, 2023
Merged

Support fourmolu 0.13 #3662

merged 4 commits into from
Jun 15, 2023

Conversation

brandonchinn178
Copy link
Contributor

@brandonchinn178 brandonchinn178 commented Jun 15, 2023

Includes the revert from #3661. Feel free to merge into one PR. cc @joyfulmantis

Tested with the following script:

(
    set -e
    function test_fourmolu() {
        local constraint="fourmolu$1"
        echo "#### $constraint"
        cabal test \
            -w "$2" \
            --constraint "$constraint" \
            --index-state HEAD \
            hls-fourmolu-plugin
    }
    test_fourmolu '==0.13.0.0' 'ghc-9.6.1'
    test_fourmolu '<0.13' 'ghc-9.6.1'
    test_fourmolu '<0.8.1' 'ghc-9.2.7'
    test_fourmolu '<0.7' 'ghc-9.2.7'
)

Note: I noticed the tests sometimes flakily fail with

Could not access 'plugins/hls-fourmolu-plugin/test/testdata/test/testdata/Fourmolu2.formatted.hs'

Not sure what's happening, and why the test directory is repeated.

, goldenWithFourmolu cli "formats imports correctly" "Fourmolu" "formatted" $ \doc -> do
, goldenWithFourmolu cli "formats imports correctly" "Fourmolu2" "formatted" $ \doc -> do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have been testing the wrong file for quite a while:
f653555#diff-5e783ba6072f1ca27c7171a3ece5043ea46f212e57f68272b52ecc36a8152d59L26-L36

@joyfulmantis joyfulmantis added the merge me Label to trigger pull request merge label Jun 15, 2023
@mergify mergify bot merged commit 6ae970e into haskell:master Jun 15, 2023
@fendor fendor mentioned this pull request Aug 8, 2023
19 tasks
@brandonchinn178 brandonchinn178 deleted the fourmolu-0.13 branch August 16, 2023 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants