Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
url = https://github.com/ghcjs/ghcjs-base.git
[submodule "boot/directory"]
path = boot/directory
url = http://git.haskell.org/packages/directory.git/
url = https://github.com/forked-upstream-packages-for-ghcjs/directory.git
[submodule "boot/unix"]
path = boot/unix
url = https://github.com/ghc/packages-unix.git
url = https://github.com/forked-upstream-packages-for-ghcjs/unix.git
[submodule "boot/Win32"]
path = boot/Win32
url = https://github.com/ghc/packages-Win32.git
url = https://github.com/forked-upstream-packages-for-ghcjs/win32.git
[submodule "boot/time"]
path = boot/time
url = https://github.com/ghc/packages-time.git
[submodule "boot/process"]
path = boot/process
url = https://github.com/ghc/packages-process.git
url = https://github.com/forked-upstream-packages-for-ghcjs/process.git
[submodule "boot/bytestring"]
path = boot/bytestring
url = https://github.com/haskell/bytestring.git
url = https://github.com/forked-upstream-packages-for-ghcjs/bytestring.git
[submodule "boot/dlist"]
path = boot/dlist
url = https://github.com/spl/dlist.git
Expand All @@ -39,13 +39,13 @@
url = https://github.com/ekmett/mtl.git
[submodule "boot/filepath"]
path = boot/filepath
url = http://git.haskell.org/packages/filepath.git
url = https://github.com/forked-upstream-packages-for-ghcjs/filepath.git
[submodule "boot/old-locale"]
path = boot/old-locale
url = http://git.haskell.org/packages/old-locale.git
url = https://git.haskell.org/packages/old-locale.git
[submodule "boot/primitive"]
path = boot/primitive
url = https://github.com/haskell/primitive
url = https://github.com/forked-upstream-packages-for-ghcjs/primitive.git
[submodule "boot/scientific"]
path = boot/scientific
url = https://github.com/basvandijk/scientific.git
Expand All @@ -66,10 +66,10 @@
url = https://github.com/bos/aeson.git
[submodule "boot/old-time"]
path = boot/old-time
url = https://git.haskell.org/packages/old-time.git
url = https://github.com/forked-upstream-packages-for-ghcjs/old-time.git
[submodule "boot/random"]
path = boot/random
url = http://git.haskell.org/packages/random.git
url = https://git.haskell.org/packages/random.git
[submodule "boot/text"]
path = boot/text
url = https://github.com/bos/text
Expand All @@ -78,22 +78,22 @@
url = https://github.com/haskell/cabal.git
[submodule "boot/hashable"]
path = boot/hashable
url = https://github.com/tibbe/hashable.git
url = https://github.com/forked-upstream-packages-for-ghcjs/hashable.git
[submodule "boot/extensible-exceptions"]
path = boot/extensible-exceptions
url = http://git.haskell.org/packages/extensible-exceptions.git
url = https://git.haskell.org/packages/extensible-exceptions.git
[submodule "boot/transformers"]
path = boot/transformers
url = http://git.haskell.org/darcs-mirrors/transformers.git
url = https://git.haskell.org/darcs-mirrors/transformers.git
[submodule "boot/async"]
path = boot/async
url = https://github.com/simonmar/async.git
[submodule "boot/parallel"]
path = boot/parallel
url = http://git.haskell.org/packages/parallel.git
url = https://git.haskell.org/packages/parallel.git
[submodule "boot/stm"]
path = boot/stm
url = http://git.haskell.org/packages/stm.git
url = https://git.haskell.org/packages/stm.git
[submodule "boot/case-insensitive"]
path = boot/case-insensitive
url = https://github.com/basvandijk/case-insensitive.git
Expand Down
73 changes: 48 additions & 25 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,54 @@ removes any existing version.

## Developing the libraries

All libraries are included as git submodules. Most of them directly refer
to the upstream repository, since maintaining our own fork is rather
heavyweight and most packages can be used unchanged or almost unchanged.

`ghcjs-boot` applies the patches under
`/patches` after initializing the submodules when the repository is first
cloned. After that, you're on your own, `ghcjs-boot` does not try to
re-apply updated patches.

to update a patched submodule:

$ git reset --hard
$ git checkout branch
$ git pull
$ patch -p1 < ../../patches/package.patch

now fix any issues with the patch. to quickly get a new patch without
making a commit, add all untracked files using `git add -N`, and then:

$ git diff > ../../patches/package.patch

and add the changes to the commit (from the root of the repository):

$ git add patches/package.patch
$ git add boot/package
All libraries are included as git submodules. The submodules either point to a
fork of ours or the upstream repository if the library can be used as-is. Our
forks have branches that share names with the the GHCJS branch name that uses
them. The forks' branches should never be forced-pushed, even if upstream's
branches are forced-pushed, so that older GHCJS's submodules still work.

### Fork cheatsheet

See `docs/git-demo.png` for a valid (hypothetical) fork of ours with these
guidelines in action.

- **Add upstream remote**:
```sh
$ git remote add upstream <URL>
```
Unfortunately the submodule can not be made to keep track of this extra
remote.

- **Use newer version of upstream**:
```sh
$ git merge <upstream-tagged-release>
```
If upstream doesn't tag their releases, shame on them! Try comparing the
Hackage release tarball with their repo to find the right commit.

- **Change patch (nothing to do with upstream)**:
```sh
# make changes
$ git commit
```
Just like normal.

- **Tag for GHCJS release**:
```sh
$ git tag ghcjs-<version>
```
Local tags and tags from remotes all live in the same namespace, hence we use
the `ghcjs-` prefix to distinugish our releases from upstream's.


- **Clean up history for PR**:
```sh
$ git checkout -b pull-request-for-upstream
$ git rebase -i upstream/master
```
Do this only in the case that our merge history makes for an unreadable diff.
Merge with upstream after PR is merged just like one was merging an upstream
release.

## Preparing a release

Expand Down
2 changes: 1 addition & 1 deletion boot/bytestring
2 changes: 1 addition & 1 deletion boot/directory
2 changes: 1 addition & 1 deletion boot/filepath
2 changes: 1 addition & 1 deletion boot/hashable
2 changes: 1 addition & 1 deletion boot/old-time
Submodule old-time updated 1 files
+75 −1 System/Time.hsc
2 changes: 1 addition & 1 deletion boot/primitive
2 changes: 1 addition & 1 deletion boot/process
Binary file added docs/git-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading