goldfirere / ghc

Mirror of ghc repository. DO NOT SUBMIT PULL REQUESTS HERE
http://www.haskell.org/ghc/
Other
25 stars 1 forks source link

Wrong GHC submodule URLs complicate drop-in replacement usage #35

Closed deepfire closed 9 years ago

deepfire commented 9 years ago

Exhibit:

[nix-shell:~/tmp]$ git clone https://github.com/goldfirere/ghc.git
Cloning into 'ghc'...
remote: Counting objects: 379902, done.
remote: Compressing objects: 100% (249/249), done.
remote: Total 379902 (delta 71), reused 0 (delta 0), pack-reused 379651
Receiving objects: 100% (379902/379902), 142.53 MiB | 9.32 MiB/s, done.
Resolving deltas: 100% (264280/264280), done.
Checking connectivity... done.
[nix-shell:~/tmp]$ cd ghc
[nix-shell:~/tmp/ghc]$ git submodule init
Submodule 'libffi-tarballs' (https://github.com/goldfirere/libffi-tarballs.git) registered for path 'libffi-tarballs'

..but of course there's no https://github.com/goldfirere/libffi-tarballs.git repository, so the typical GHC build scenarios encoded, for example in NixOS, don't work.

goldfirere commented 9 years ago

Yes, this is a known infelicity. I'd be very happy to accept a pull request or other instructions for how to fix this, but I don't really have the git expertise to design a solution to this problem. In the meantime, I recommend following the instructions in the top-level README about getting the right submodules set up.

I'll leave this ticket open as a request for a fix.

PS: Maybe this is really simple. Would changing the url entries in .gitmodules do the trick? If it's that easy, then I can indeed do it myself. Any git experts out there who can offer advice? Thanks!

edsko commented 9 years ago

I don't have a good answer here either, but I tend to change the .gitmodules file to have absolute URLs instead.

deepfire commented 9 years ago

Submitted a pull request doing just that.

deepfire commented 9 years ago

Actually, I think this may belong to GHC mainline.

It seems like it shifts the balance of convenence away from people doing development across GHC-with-modules towards people publishing GHC forks.

Whether it is desirable is an open question..

edsko commented 9 years ago

This problem has always rather annoyed me alright, but I always figured that I was just missing some obvious git solution here.

goldfirere commented 9 years ago

I've accepted PR #36, closing this issue. But I've made a note to myself to undo the change before merging with master. I considered pushing this notion upstream, but I can't make a strong argument for the change. Anyone else is welcome to take this up on GHC's Trac.