Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
Francesco Occhipinti edited this page Nov 9, 2015 · 13 revisions

upgrading GHCJS

With a recent version

Just execute again the commands in the Quick Start section of the README, adding --clean to ghcjs-boot, like this:

$ cabal install http://ghcjs.luite.com/master.tar.gz
$ ghcjs-boot --clean

Older docs

The following docs might be outdated, but you could get some useful info from them, for some corner cases.

If you have an existing GHCJS installation and want to upgrade to a later version, do the following in this order:

  • install Cabal and cabal-install from the ghcjs branch of https://github.com/ghcjs/cabal.git
  • clean the cabal setup exe cache by removing the contents of ~/.cabal/setup-exe-cache
  • install the latest ghcjs-prim, haddock-internal and ghcjs packages
  • run ghcjs-boot --dev --clean to remove the previous installation and build the libraries

upgrading specific parts

if you have an existing installation with some customization that you want to keep, you can still upgrade the compiler and libraries. follow the steps above but do not run ghcjs-boot with the --clean option, instead do this (assuming you have a ghcjs-boot --dev installation`) :

  • go to the ghcjs library directory ( use ghcjs --print-libdir, usually ~/.ghcjs/compilerversion/ghcjs ), and there:
    • git pull in the shims subdirectory to update shims (runtime system)
    • git pull in the ghcjs-boot subdirectory to update the libraries that ghcjs-boot builds
    • to redo specific steps of the installation, remove checkpoint names from the ghcjs_boot.charlie file. warning: removing the ghcjs-boot-git or shims-git lines will make ghcjs-boot overwrite the respective git repository
  • run ghcjs-boot --dev as normal

multiple installations

if you have an existing installation that you don't want to break, you can install an upgraded version to a different library directory. Using a sandbox to keep your new version separate can be useful, do the following:

  • update your Cabal and cabal-install but install to a different bin directory (in case command line options change)
  • install ghcjs-prim and ghcjs to the same bin directory (you also need a different data directory if you plan on running ghcjs-boot on your existing ghcjs installation again).
  • in the new bin directory, edit the ghcjs, ghcjs-pkg and haddock-ghcjs wrapper scripts (these are actually symlinks to the script) to point to the new library directory
  • verify that the new bin dir is in your PATH and that ghcjs --print-libdir gives the correct location
  • run ghcjs-boot --dev to boot

note: while your GHCJS installations will have a different libraries location and global package databases, they will still use the same user package database if they have the same version number. Use sandboxes instead of the user package db to keep package installations completely separate.

Clone this wiki locally