-
Notifications
You must be signed in to change notification settings - Fork 90
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
"No formatter found" (Brittany) #255
Comments
Thank you for the report! I have noticed this, too. I think I messed up the cabal flags somewhere. |
The static binaries are indeed built without the AGPL flag. However I'm not sure if we would be able to turn it on since I think this counts as distributing, which would be mean we would need to distribute the binaries under AGPL too (I'm no license expert here so feel free to correct me) |
Since brittany isn't included in the static binaries due to licensing restrictions Fixes haskell#255
I would argue that we should build with the AGPL flag, as the norm. Then people constrained by corporate policy can sort themselves out. |
@bubba I'm still facing this problem with
is there any workaround how to actually use Brittany? If there's some issue with the bundled one, can I somehow tell HLS to use the external Brittany binary I have in |
@vaclavsvejcar HLS doesn't call the Brittany binary, it includes it as a library dependency. I read a bit more on the AGPL and think we're actually ok to build the binaries with it, since HLS also has the source publicly available. I'm going to make a PR to build the binaries with Brittany, but it looks like it won't be available on ghc-8.10.1 (@jneira any word on this by the way? I'm thinking of vendoring this lspitzner/brittany#305) |
@bubba Thanks a lot for the answer. Actually if I'm correct, in the old VSCode extension for HIE I think there was an option to provide path to external Brittany (or other formatter) binary. Would something like that be possible also for this extension, or is there any technical issue why that's not possible? For example my use case was that I used custom-built Brittany that contained some more features than the public release, and maybe it would be cool to have such option in |
@vaclavsvejcar ah I see, I don't think there's currently anything inside HLS for invoking a binary to do the formatting. The plugins in HLS currently don't rely on calling external tools, but not for any technical reason as far as I'm aware, other than perhaps to make distributing binaries easier. Although for your custom built Brittany I'd imagine it would be pretty easy to build your own HLS from source with the custom Brittany vendored in! If you edit the |
On a fresh install, Brittany is set as the default formatter, but any formatting requests fail, with the log showing:
Perhaps the binaries were compiled without the AGPL flag?
FWIW, my vote is very much for Ormolu as the default. For one thing, on the first file I tested, it was the only one that actually worked, due to the presence of
ImportQualifiedPost
.The text was updated successfully, but these errors were encountered: