Skip to content

Commit

Permalink
Branch name needed for shims too.
Browse files Browse the repository at this point in the history
The instructions were missing the branch name to use from the shims repo.

I gave a concrete example for the ghc-8.0 branch that worked for me on OSX.
  • Loading branch information
philderbeast committed Jun 25, 2017
1 parent 8c30beb commit 2495e5f
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,26 @@ Get `ghcjs` from Github and install it:
$ git clone https://github.com/ghcjs/ghcjs.git
$ cabal install ./ghcjs

#### Build the libraries
#### Build the Base Libraries

Use `ghcjs-boot` to build the base libraries for `GHCJS`:

if you used the Git repository to install:
$ ghcjs-boot --dev

if you are doing a development build from a different branch than `master`, you need to tell `ghcjs-boot` to use the correct branch of the `ghcjs-boot` and `shims` repositories:
$ ghcjs-boot --dev --ghcjs-boot-dev-branch somebranch --shims-dev-branch

if you are installing from hackage, the ghcjs source distribution package already includes the correct libraries. run:
$ ghcjs-boot
When installing from hackage, as shown above in the quickstart, the built base libraries are included in the source distribution package.
```
$ ghcjs-boot
```

Alternately, if you used the [ghcjs](https://github.com/ghcjs/ghcjs) repository to install.
* On the `master` branch.
```
$ git branch
* master
$ ghcjs-boot --dev
```
* On another branch, such as `ghc-8.0`, supply the branch names for repositories [ghcjs-boot](https://github.com/ghcjs/ghcjs-boot) and [shims](https://github.com/ghcjs/shims).
```
$ git branch
* ghc-8.0
$ ghcjs-boot --dev --ghcjs-boot-dev-branch ghc-8.0 --shims-dev-branch ghc-8.0
```
Some distros install node.js as `nodejs` instead of `node`. Add `--with-node nodejs` to the `ghcjs-boot` command in that case.

Usage
Expand Down

1 comment on commit 2495e5f

@ddssff
Copy link
Contributor

@ddssff ddssff commented on 2495e5f Nov 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc for ghcjs-boot says you can override branch and commit - how would this be done?

Apparently you can't, but here's a patch that lets you do it:

--- a/src-bin/Boot.hs   2017-11-11 10:15:50.945621443 -0800
+++ b/src-bin/Boot.hs   2017-11-11 10:16:21.869975253 -0800
@@ -600,7 +600,7 @@
       branch' <- view (beSources . branch)
       sub $ do
         cd repoName
-        git_ ["checkout", branch']
+        git_ ("checkout" : T.words branch')
     cloneGitSrcs d [] = failWith ("could not clone " <> d <> ", no available sources")
     cloneGitSrcs d (x:xs) = git_ ["clone", x] `catchAny_`
       (msgD warn "clone failed, trying next source" >> cloneGitSrcs d xs)

Then you can say --shims-dev-branch "-B ghc-8.0 85395dce971e23a39e5f93af4ed139ca36d4e448"

Please sign in to comment.