Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Package hie binaries #1068

Open
Tracked by #1383
samuelpilz opened this issue Jan 29, 2019 · 15 comments
Open
Tracked by #1383

Package hie binaries #1068

samuelpilz opened this issue Jan 29, 2019 · 15 comments
Labels
build Continuous integration and building
Milestone

Comments

@samuelpilz
Copy link
Contributor

I would like to package the hie binaries with some linux package managers (maybe starting with by distribution archlinux and put the package haskell-ide-engine-bin on the aur)

I am not quite sure what is needed for a correct build of hie. Could it be that it is necessary to:

  • install hie-* to $PATH
  • install hie-wrapper to $PATH
  • install cabal-helper-wrapper to $PATH
@mpickering
Copy link
Collaborator

HIE is packed for nix already. It could be useful to look at that to see what wrappers are needed and so on - https://github.com/domenkozar/hie-nix

@alanz alanz modified the milestones: 2019-02, 2019-03 Mar 2, 2019
@LinArcX
Copy link

LinArcX commented Mar 4, 2019

For arch linux users:
You can now download binary version from archlinuxcn repo:
archlinuxcn/repo#1044

@samuelpilz
Copy link
Contributor Author

samuelpilz commented Mar 16, 2019

I have tried to analyze this situation. A standalone-binary distribution faces the issue that there are many runtime dependencies. Some of them cannot be easily provided by a binary-distribution. Having stack and the binary hie is not sufficient.

I have done:

  1. build hie on the host machine
  2. setup a fresh VM (archlinux), install stack and git and setup path for .local/bin
  3. copy hie binary to guest VM
  4. install atom and visual studio code (from archlinux repositories) and appropriate plugins
  5. Nothing worked. Errors: hoogle db not found and cabal-install not installed,
  6. I did stack build hoogle; stack exec hoogle generate
  7. stack install cabal-install
  8. Nothing worked. error: $HOME/.local/bin/data/hlint.yaml was not found
  9. create empty file $HOME/.local/bin/data/hlint.yaml
  10. Nothing worked. errors: cabal-helper-wrapper not found.
  11. Copy cabal-helper-wrapper (found via stack exec which -- cabal-helper-wrapper) from host
  12. Nothing worked. Error: file .../.stack/.../ghc-8.6.4/lib/ghc-8.6.4/settings missing (path is to ghc on host, which was used to compile ``)
  13. building cabal-helper from within the guest was not successful (Could not resolve dependencies ...).
  14. I gave up (for now)

Conclusion
I found runtime-dependencies:

  • cabal-install
  • hoogle database generated by stack exec hoogle generate
  • $HOME/.local/bin/data/hlint.yaml needs to be there, for whatever reason
  • cabal-helper-wrapper needs to be present in cabal_helper_libexecdir.
  • some settings file needs to be present for cabal-helper-wrapper

I would be interested in what the nix package does to mitigate these problems but I have not the experience with nix so I cannot find out how they do it

@lukel97 lukel97 mentioned this issue Apr 3, 2019
4 tasks
@alanz alanz modified the milestones: 2019-03, 2019-04 Apr 6, 2019
@nponeccop nponeccop added the build Continuous integration and building label Apr 10, 2019
@alanz alanz modified the milestones: 2019-04, 2019-05 May 4, 2019
@fendor fendor mentioned this issue May 11, 2019
@alanz alanz modified the milestones: 2019-05, 2019-06 Jun 1, 2019
@jneira
Copy link
Member

jneira commented Jun 20, 2019

I think it would be great (necessary?) to have windows precompiled binaries, too. AFAIK it is easier to maintain cause they usually work across different windows versions, without worry about dynamic linking.
The best approach could be use appveyor to generate them and upload to release assets auto (see how we did with dhall-haskell) f.e.
To avoid running out of space we could only generate artifacts for releases and maybe master branch, if possible.
The zip could contain all the runtime deps in relative paths, copying them from the appveyor host. We should use the appropiate config options to change default paths to relative ones, if possible.

@NickSeagull
Copy link
Contributor

Is there a way that I can help with this? I'm on Windows so I can help with the Windows and the Linux version (I use WSL also)

@lorenzo
Copy link
Collaborator

lorenzo commented Sep 10, 2019

@NickSeagull trying to package your local install and use in another machine, then document what or why it does not work would be of great help

@jneira
Copy link
Member

jneira commented Jan 8, 2020

It seems there is another runtime dependency involving brittany, is worth create a new issue @fendor?

@alanz
Copy link
Collaborator

alanz commented Jan 8, 2020

@jneira I spoke with @lspitzner on IRC last night, and I think he is planning on exposing an API where we pass the parsed AST from hie-plugin-api, thus avoiding the run-time problem.

@jneira
Copy link
Member

jneira commented Feb 5, 2020

I think include binaries in releases still worth, although we are starting to move to haskell-language-server. @alanz Is there some update about the brittany change? can i help in some way?

@fendor
Copy link
Collaborator

fendor commented Feb 5, 2020

@jneira I attempted to use pPrintModule for the formatting, but had a bunch of of problems that I could not easily solve (mainly understanding the API, etc...)

@alanz
Copy link
Collaborator

alanz commented Feb 5, 2020

I don't know the current state of brittany, but I am pretty sure @lspitzner exposed the required API shortly after we discussed it. Then all we have to do is pass in the already-loaded typechecked (or parsed) module and we are good to go. We can ignore all the stuff about context, libdirs, etc

@poscat0x04
Copy link

poscat0x04 commented Feb 8, 2020

We (archlinuxcn) are providing prebuilt binaries for Arch Linux.
We maintain an automated build bot that recompiles HIE whenever the upstream AUR repo updates.
The usage of our repo is described in the README file.
If you are using other distros you can unzip the package and move the binaries to wherever you want.
A build status page is also available.

@jneira
Copy link
Member

jneira commented Feb 8, 2020

@poscat0x04 wow that are great news, could we add that way to get binaries in the docs?

@poscat0x04
Copy link

Sure. I forgot to mention that packages are placed under https://repo.archlinuxcn.org/x86_64/ .

@andys8
Copy link
Contributor

andys8 commented Feb 20, 2020

@poscat0x04 Are the binaries expected to work other OS like debian/ubuntu? (Update: Nope)
Having the binaries would be great :)

#!/bin/sh
VERSION="1.1-4"
cd /tmp
wget https://repo.archlinuxcn.org/x86_64/haskell-ide-engine-$VERSION-x86_64.pkg.tar.zst
tar -I zstd -xvf haskell-ide-engine-$VERSION-x86_64.pkg.tar.zst
cp usr/bin/* ~/bin/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Continuous integration and building
Projects
None yet
Development

No branches or pull requests