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

Possible to have pre-built binaries #543

Closed
joneshf opened this issue Apr 12, 2020 · 11 comments · Fixed by #648
Closed

Possible to have pre-built binaries #543

joneshf opened this issue Apr 12, 2020 · 11 comments · Fixed by #648

Comments

@joneshf
Copy link

joneshf commented Apr 12, 2020

The situation

Building ormolu from source takes a long time (primarily due to ghc-lib-parser). In an unconstrained environment, this is an annoyance. In a constrained environment, this becomes an issue.

One example is if ormolu is being built on CI. It's possible to timeout building just ormolu (depending on the CI service). If there were binaries available for download, that ought to make using (and adopting) ormolu considerably easier. That's not the only example, but it's one that I run into often.

Some inspiration can be found with hlint. There are binaries to pull down hlint directly, or a script to run hlint automatically (if you trust scripts off the internet). Not asking for this level of commitment. Pointing out some prior art.

The ask

Is there any possibility we could get pre-built binaries available for download?

I'm not asking for a specific location on the internet, automation with CI, or any of that right now. The only thing I'm really looking for is at least one pre-built binary available for download (could be manually added to a release for all it matters to me). It would be ideal to have binaries for Linux, macOS, and Windows, but even just having one of the three would be a huge improvement or having to build from source.

If there are pre-built binaries available somewhere, could the documentation be a bit more explicit on where to find them? I didn't see anything that immediately popped out in the readme.

@joneshf
Copy link
Author

joneshf commented Apr 21, 2020

Bump.

@mrkkrp
Copy link
Member

mrkkrp commented Apr 21, 2020

We've seen your request.

@joneshf
Copy link
Author

joneshf commented Apr 21, 2020

I'm sorry, I'm not sure how to interpret that response. Does that mean it won't happen? Does that mean it's in the works? Does that mean something else?

@mrkkrp
Copy link
Member

mrkkrp commented Apr 21, 2020

What I meant is that we're aware of this request. Right now this is not in our blacklog, but it doesn't mean that it won't happen, eventually.

@joneshf
Copy link
Author

joneshf commented Apr 22, 2020

Gotcha. Thanks for explaining!

@jkachmar
Copy link

jkachmar commented May 4, 2020

Would y'all be open to accepting a PR that enables automating the process of building/releasing binaries in CI or something?

I'm using ormolu with Nix, which is arguably the most convenient way to add it to a project, and even then I'm not thrilled with the additional space it takes on my machine versus a plain binary.

@mrkkrp
Copy link
Member

mrkkrp commented May 4, 2020

Perhaps just adding a Nix expression that builds a fully static Ormolu binary would be enough?

@joneshf
Copy link
Author

joneshf commented May 6, 2020

As long as that's addressable somehow on the internet without using nix explicitly, that would be enough for me.

@mboes
Copy link
Member

mboes commented May 10, 2020

Stack provides static binaries for convenience. It wouldn't be outrageous for Ormolu to do the same, for those people who are happy to run untrusted binary blobs from the internet on their system.

@utdemir
Copy link
Contributor

utdemir commented May 23, 2020

I tried to compile a static Ormolu executable using pkgsMusl from Nix, however it seems like we're blocked on NixOS/nixpkgs#85924.

@pjones
Copy link

pjones commented Jun 24, 2020

I have a branch with a static.nix file that can build a static Linux executable. Note that I needed to update the nixpkgs commit to the latest on nixpkgs-unstable.

While the package set used to build the static executable comes from the static-haskell-nix project, I'm using nix-hs since it can patch nixpkgs to work around the previously mentioned issue (NixOS/nixpkgs#85924).

gasi added a commit to zoomhub/zoomhub that referenced this issue Jul 15, 2020
Building `ormolu` on CI takes a long time (~13min) and the project
currently doesn’t offer pre-built binaries:
tweag/ormolu#543

Even though building it succeeded, running it resulted in `ExitFailure
100` and the command exited with status 102:
https://app.circleci.com/pipelines/github/zoomhub/zoomhub/106/workflows/8bf55777-ff22-42aa-8748-6837df1477fa/jobs/424
gasi added a commit to zoomhub/zoomhub that referenced this issue Jul 15, 2020
Building `ormolu` on CI takes a long time (~13min) and the project
currently doesn’t offer pre-built binaries:
tweag/ormolu#543

Even though building it succeeded, running it resulted in `ExitFailure
100` and the command exited with status 102:
https://app.circleci.com/pipelines/github/zoomhub/zoomhub/106/workflows/8bf55777-ff22-42aa-8748-6837df1477fa/jobs/424
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants