-
Notifications
You must be signed in to change notification settings - Fork 186
Upgrading GHCJS
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
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
Cabalandcabal-installfrom theghcjsbranch 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-internalandghcjspackages - run
ghcjs-boot --dev --cleanto remove the previous installation and build the libraries
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 pullin theshimssubdirectory to update shims (runtime system) -
git pullin theghcjs-bootsubdirectory to update the libraries that ghcjs-boot builds - to redo specific steps of the installation, remove checkpoint names from the
ghcjs_boot.charliefile. warning: removing theghcjs-boot-gitorshims-gitlines will makeghcjs-bootoverwrite the respective git repository
-
- run
ghcjs-boot --devas normal
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
Cabalandcabal-installbut install to a differentbindirectory (in case command line options change) - install
ghcjs-primandghcjsto the same bin directory (you also need a different data directory if you plan on runningghcjs-booton your existing ghcjs installation again). - in the new bin directory, edit the
ghcjs,ghcjs-pkgandhaddock-ghcjswrapper scripts (these are actually symlinks to the script) to point to the new library directory - verify that the new bin dir is in your
PATHand thatghcjs --print-libdirgives the correct location - run
ghcjs-boot --devto 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.