Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Support executable-only packages and non-Haskell libraries #4

Closed
mietek opened this issue Jun 3, 2014 · 7 comments
Closed

Support executable-only packages and non-Haskell libraries #4

mietek opened this issue Jun 3, 2014 · 7 comments
Assignees

Comments

@mietek
Copy link
Owner

mietek commented Jun 3, 2014

Add uniform support for dependencies which may be Haskell executable-only packages or non-Haskell libraries.

Relevant issues:

Examples:

  • language-javascript and haskell-src-exts need alex and happy
  • type-eq needs cpphs
  • pcre-light needs libpcre
@mietek mietek self-assigned this Jun 3, 2014
@mietek mietek changed the title Support Haskell executable-only packages and non-Haskell libraries Support executable-only packages and system libraries Jun 3, 2014
@mietek mietek changed the title Support executable-only packages and system libraries Support bin-only packages and system libraries Jun 3, 2014
@mietek mietek changed the title Support bin-only packages and system libraries Support bin-only packages and sys libs Jun 3, 2014
@mietek mietek changed the title Support bin-only packages and sys libs Support executable-only packages and non-Haskell libraries Jun 3, 2014
@begriffs
Copy link

begriffs commented Jun 3, 2014

There are a couple more ones you'll want.

  • A modern libgmp. Heroku has an old one (version 3 I think) installed by default
  • Symlink libncurses to the name libtinfo since some packages are looking for it by that name

@mietek
Copy link
Owner Author

mietek commented Jun 3, 2014

libgmp and libtinfo are already handled, as they are prerequisites for GHC and Cabal.

Do you mean some packages specifically require libgmp.so.10?

@begriffs
Copy link

begriffs commented Jun 3, 2014

Oh, nevermind I didn't review the code carefully enough to notice those libraries were already handled.

@mietek mietek added this to the 1.0 milestone Jun 3, 2014
This was referenced Jun 19, 2014
@mietek
Copy link
Owner Author

mietek commented Jun 21, 2014

Work in progress report:

We can now easily determine what are the exact executable-only packages and non-Haskell libraries needed to install any Cabal package.

$ time (
>     lib_constraints=$( cabal_list_planned_lib_constraints /tmp/haskell-on-heroku-examples/hello-yesod-platform ) &&
>     echo "${lib_constraints}" | cabal_get_all_package_files 1 /tmp/lib_package_files &&
>     echo "${lib_constraints}" | cabal_dump_all_package_build_tools /tmp/lib_package_files | sed 's/^/build-tools: /' &&
>     echo "${lib_constraints}" | cabal_dump_all_package_extra_libs /tmp/lib_package_files | sed 's/^/extra-libs: /'
> )
build-tools: hsc2hs
build-tools: alex
build-tools: happy
extra-libs: z

real  0m11.015s
user  0m15.550s
sys   0m2.530s

This work would benefit from cabal get being able to output just the package description. (haskell/cabal#1954)

@mietek
Copy link
Owner Author

mietek commented Oct 8, 2014

A proper implementation of my ideas for solving this issue ought to be done as an improvement to Cabal. My first step towards this (PR haskell/cabal#1977) has been stuck in the review pipeline for a while now.

I am leaving this for later, as there is now another way to achieve the same results.

@mietek mietek removed this from the 1.0 milestone Oct 8, 2014
@mietek mietek removed their assignment Oct 8, 2014
@mietek mietek closed this as completed Oct 14, 2014
@mietek mietek reopened this Oct 21, 2014
@mietek mietek self-assigned this Oct 22, 2014
@mietek
Copy link
Owner Author

mietek commented Oct 22, 2014

Pre- and post-build hooks are now included, hashed and tracked as dependencies. This work turned out to be a great start towards complete automation.

It is now possible to automatically deploy extra apps with a single Halcyon invocation. For example, here’s how to deploy Idris in 0m51.807s:

$ deploy --sandbox-extra-apps=alex-3.1.3 idris

Support for non-Haskell libraries is now tracked as #33.

@mietek mietek closed this as completed Oct 22, 2014
@mietek mietek added this to the 1.0 milestone Oct 22, 2014
@mietek
Copy link
Owner Author

mietek commented Dec 12, 2014

Executable-only packages needed as build-tools can be declared in .halcyon/sandbox-extra-apps.

Non-Haskell libraries can be declared as native OS packages in .halcyon/sandbox-extra-os-packages for build-time dependencies, and in .halcyon/extra-os-packages for run-time dependencies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants