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

Exactprint plugins for 9.8 #3973

Merged
merged 10 commits into from
Jan 18, 2024
Merged

Exactprint plugins for 9.8 #3973

merged 10 commits into from
Jan 18, 2024

Conversation

wz1000
Copy link
Collaborator

@wz1000 wz1000 commented Jan 17, 2024

I ran out of steam fixing this refactor plugin test:

    suggest import actions
      Dont want suggestion
        f = nonEmpty:       FAIL (0.21s)
          test/Main.hs:1772:
          expected: []
           but got: ["import Data.List.NonEmpty (nonEmpty)"]
          Use -p '/f = nonEmpty/' to rerun this test only.

Perhaps someone else would like to have a look?

Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Changes look plausible, would be nice to get the last few tests sorted!

plugins/hls-gadt-plugin/test/Main.hs Outdated Show resolved Hide resolved
@@ -703,7 +703,11 @@ typeWildCardActionTests = testGroup "type wildcard actions"
[ "func :: _"
, "func x y = x + y"
]
#if MIN_VERSION_ghc(9,7,0)
[ "func :: a -> a -> a" -- 9.8 has a different suggestion
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems kind of bad, is this an upstream regression?

@wz1000
Copy link
Collaborator Author

wz1000 commented Jan 18, 2024

I have no idea what the failing test is testing for or why it is desirable. It seems require that we don't suggest adding a nonEmpty import from Data.List.NonEmpty for this code. Why?

import Data.List.NonEmpty ()

f = nonEmpty

@wz1000
Copy link
Collaborator Author

wz1000 commented Jan 18, 2024

I see, it wants us to not suggest adding a new import, instead we should suggest extending the existing import.

All the tests have been fixed locally now.

Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

It looks like you figured out what the test is asking for based on the comment? Or is there still a question?

plugins/hls-refactor-plugin/hls-refactor-plugin.cabal Outdated Show resolved Hide resolved
@michaelpj
Copy link
Collaborator

Great, thanks for tracking that down!

Copy link
Collaborator

@konn konn left a comment

Choose a reason for hiding this comment

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

LGTM as for Splice Plugin, Thanks!

@michaelpj
Copy link
Collaborator

Yeah, it seems like we can use ghcVersion whenever we just have differences in values, which seems like a win!

@wz1000 wz1000 requested a review from fendor as a code owner January 18, 2024 10:07
@michaelpj
Copy link
Collaborator

Still a build failure in the gadt tests

@wz1000 wz1000 enabled auto-merge (rebase) January 18, 2024 14:29
@wz1000 wz1000 disabled auto-merge January 18, 2024 14:29
@wz1000 wz1000 added the merge me Label to trigger pull request merge label Jan 18, 2024
@mergify mergify bot merged commit b5a8063 into master Jan 18, 2024
41 of 42 checks passed
josephsumabat pushed a commit to josephsumabat/haskell-language-server that referenced this pull request Jan 22, 2024
* Exactprint plugins for 9.8

* Fix last test

* comments

* fix borked cpp

* Don't use CPP in refactor plugin tests

* Fix -Wall, -Wunused-packages and hlint warnings in call-hierarchy plugin (haskell#3979)

* Fix -Wall and -Wunused-packages in call-hierarchy plugin

* Make tests more uniform

* accept func test differences

* Run tests for 9.8 plugins in CI

* Fix another test

---------

Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

4 participants