Skip to content

Fix Fourmolu 0.7 support #2950

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

Merged
merged 3 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ package *

write-ghc-environment-files: never

index-state: 2022-04-30T21:02:45Z
index-state: 2022-06-12T00:00:00Z

constraints:
hyphenation +embed,
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ provider plId ideState typ contents fp fo = withIndefiniteProgress title Cancell
(exitCode, out, err) <-
readCreateProcessWithExitCode
( proc "fourmolu" $
["-d"]
["-d", "--no-cabal"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, here's a reason for the "compile against the package" approach: we don't have a sane way of knowing whether or not to pass this flag, since it depends on which CLI version the user has installed!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we don't have a sane way of knowing whether or not to pass this flag

Sane or not, fixed in 581686c.

(CLI mode isn't enabled by default, so I'm not too concerned about any weirdness)

<> catMaybes
[ ("--start-line=" <>) . show <$> regionStartLine region
, ("--end-line=" <>) . show <$> regionEndLine region
Expand Down