Skip to content

hls-hlint-plugin test failure in Gentoo Linux #3217

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

Open
hololeap opened this issue Sep 23, 2022 · 3 comments
Open

hls-hlint-plugin test failure in Gentoo Linux #3217

hololeap opened this issue Sep 23, 2022 · 3 comments
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@hololeap
Copy link
Contributor

hololeap commented Sep 23, 2022

I'm getting a test failure for hls-hlint-plugin-1.1.0.0:

    .hlint.yaml fixity rules are applied:                                                                                     FAIL (8.52s)
      src/Test/Hls/Util.hs:308:
      Got unexpected diagnostics for Uri {getUri = "file:///var/tmp/portage/dev-haskell/hls-hlint-plugin-1.1.0.0/work/hls-hlint-plugin-1.1.0.0/test/testdata/fixity/FixityUse.hs"} got [Diagnostic {_range = Range {_start = Position {_line = 5, _character = 13}, _end = Position {_line = 5, _character = 46}}, _severity = Just DsInfo, _code = Just (InR "refact:Functor law"), _source = Just "hlint", _message = "Functor law\nFound:\n  show <$> mInt <!> pure <$> Just c\nWhy not:\n  show . (mInt <!> pure) <$> Just c\n", _tags = Nothing, _relatedInformation = Nothing}]
      Use -p '/.hlint.yaml fixity rules are applied/' to rerun this test only.

Here is the diagnostic message pretty-printed:

[ Diagnostic
    { _range = Range
        { _start = Position
            { _line = 5
            , _character = 13
            }
        , _end = Position
            { _line = 5
            , _character = 46
            }
        }
    , _severity = Just DsInfo
    , _code = Just
        ( InR "refact:Functor law" )
    , _source = Just "hlint"
    , _message = "Functor law
      Found:
        show <$> mInt <!> pure <$> Just c
      Why not:
        show . (mInt <!> pure) <$> Just c
      "
    , _tags = Nothing
    , _relatedInformation = Nothing
    }
]

Full output of the following command is here:

$ LSP_TEST_LOG_STDERR=1 LSP_TEST_LOG_MESSAGES=1 ./setup test --show-details=streaming --test-option=--color=always --test-option=+RTS --test-option=-T

Your environment

  • GHC 9.0.2 on Gentoo Linux. All packages are installed through the system package manager.
  • HLint v3.4.1

This seems to be unrelated to my other issue, as I am getting this failure when I run the tests outside Gentoo's sandbox, so it seems to be unrelated to any sandboxing issues.

@hololeap hololeap added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Sep 23, 2022
@hololeap hololeap changed the title hls-hlint-plugin test failure hls-hlint-plugin test failure in Gentoo Linux Sep 23, 2022
@michaelpj
Copy link
Collaborator

Are you using the same index-state as HLS? Could you be getting a newer version of hlint than we're testing with?

@hololeap
Copy link
Contributor Author

We're using hlint-3.4.1 and it looks like your tests are being run with hlint-3.2.8 from what I can see.

@michaelpj
Copy link
Collaborator

Okay, so newer versions of hlint might add more hints, so this is not necessarily an unexpected failure. It would be ideal if our tests were robust to that, but I have no idea if they are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants