Skip to content

Cabal Plugin Test Case is flaky #3333

Closed
@fendor

Description

@fendor

For certain GHC versions, the hls-cabal-plugin test-suite is flaky. This issue tracks a reminder that we should try to resolve it.

Testcase: "Diagnostics in .hs files from invalid .cabal file"
Run with TASTY_PATTERN="Diagnostics in .hs files from invalid" cabal test -w ghc-9.2.4 hls-cabal-plugin --test-show-details=direct to see the test failing (after removing the ignoreTestBecause line).

So far, we failed to figure out why the test-case is failing on some GHC versions occasionally. Here I try to document my debugging attempts, since we decided to merge the plugin with the flaky testcase disabled.

I am attaching here a failing and one succeeding test-run logs with -O1. Results look very different with -O0, but I think that's a general problem.

Succeeding test case with GHC 9.2.4
test.log

Failing test case with GHC 8.10.7
testfail.log

It is unfortunately even flaky, which GHC version fails to run the test.

My personal suspicion was that there is a bug in hls-graph, not re-running the rule although its dependencies have changed due to some race condition, but I was unable to make any progress on that suspicion.

Issue has been created in anticipation for the merge of #2940

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-cabal-pluginIssues related to the hls-cabal-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions