Stuck again on submodules

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Simon Peyton Jones
Help!  I can't build ghc!

I get this
utils/ghc-pkg/Main.hs:1160:24:
    Not in scope: `showSimpleInstalledPackageInfoField'
    Perhaps you meant `showInstalledPackageInfoField' (imported from Distribution.InstalledPackageInfo)

And indeed, my libraries/Cabal is way behind

simonpj at cam-05-unx:~/code/HEAD$ cd libraries/Cabal
simonpj at cam-05-unx:~/code/HEAD/libraries/Cabal$ git log -1
commit 14c5a3f78c00772cf54c2fd5c920a64d53e6f594
Author: Gabor Greif <ggreif at gmail.com>
Date:   Wed Mar 20 22:27:15 2013 +0100

            Fix typos

"git submodule status" says
14c5a3f78c00772cf54c2fd5c920a64d53e6f594 libraries/Cabal (1_10_branch_forked-1682-g14c5a3f)
1f9f7175e747aad7c424f5b12be5b95f15286f0b libraries/Win32 (2009-06-25-50-g1f9f717)
...etc

In another tree entirely "git submodule status" says
  b4d0c0... libraries/Cabal
which looks right, because that commit does futz with showInstalledPackageInfoField.

So it looks as if my main GHC repo somehow has the wrong commit for Cabal.  How do I make it right?

This is so frustrating.  Thanks

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130509/509115f9/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Jan Stolarek
Does this help:

git submodule update libraries/Cabal/

?

Janek



Dnia czwartek, 9 maja 2013, Simon Peyton-Jones napisa?:

> Help!  I can't build ghc!
>
> I get this
> utils/ghc-pkg/Main.hs:1160:24:
>     Not in scope: `showSimpleInstalledPackageInfoField'
>     Perhaps you meant `showInstalledPackageInfoField' (imported from
> Distribution.InstalledPackageInfo)
>
> And indeed, my libraries/Cabal is way behind
>
> simonpj at cam-05-unx:~/code/HEAD$ cd libraries/Cabal
> simonpj at cam-05-unx:~/code/HEAD/libraries/Cabal$ git log -1
> commit 14c5a3f78c00772cf54c2fd5c920a64d53e6f594
> Author: Gabor Greif <ggreif at gmail.com>
> Date:   Wed Mar 20 22:27:15 2013 +0100
>
>             Fix typos
>
> "git submodule status" says
> 14c5a3f78c00772cf54c2fd5c920a64d53e6f594 libraries/Cabal
> (1_10_branch_forked-1682-g14c5a3f) 1f9f7175e747aad7c424f5b12be5b95f15286f0b
> libraries/Win32 (2009-06-25-50-g1f9f717) ...etc
>
> In another tree entirely "git submodule status" says
>   b4d0c0... libraries/Cabal
> which looks right, because that commit does futz with
> showInstalledPackageInfoField.
>
> So it looks as if my main GHC repo somehow has the wrong commit for Cabal.
> How do I make it right?
>
> This is so frustrating.  Thanks
>
> Simon




Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Simon Peyton Jones
Afraid not. I'd tried "git submodule update".  The command you give is a no-op; libraries/Cabal is stuck on commit 14c5a3f; and that's what git submodule status says it should be.  But it shouldn't!

S

| -----Original Message-----
| From: Jan Stolarek [mailto:jan.stolarek at p.lodz.pl]
| Sent: 09 May 2013 13:21
| To: ghc-devs at haskell.org
| Cc: Simon Peyton-Jones
| Subject: Re: Stuck again on submodules
|
| Does this help:
|
| git submodule update libraries/Cabal/
|
| ?
|
| Janek
|
|
|
| Dnia czwartek, 9 maja 2013, Simon Peyton-Jones napisa?:
| > Help!  I can't build ghc!
| >
| > I get this
| > utils/ghc-pkg/Main.hs:1160:24:
| >     Not in scope: `showSimpleInstalledPackageInfoField'
| >     Perhaps you meant `showInstalledPackageInfoField' (imported from
| > Distribution.InstalledPackageInfo)
| >
| > And indeed, my libraries/Cabal is way behind
| >
| > simonpj at cam-05-unx:~/code/HEAD$ cd libraries/Cabal
| > simonpj at cam-05-unx:~/code/HEAD/libraries/Cabal$ git log -1 commit
| > 14c5a3f78c00772cf54c2fd5c920a64d53e6f594
| > Author: Gabor Greif <ggreif at gmail.com>
| > Date:   Wed Mar 20 22:27:15 2013 +0100
| >
| >             Fix typos
| >
| > "git submodule status" says
| > 14c5a3f78c00772cf54c2fd5c920a64d53e6f594 libraries/Cabal
| > (1_10_branch_forked-1682-g14c5a3f)
| > 1f9f7175e747aad7c424f5b12be5b95f15286f0b
| > libraries/Win32 (2009-06-25-50-g1f9f717) ...etc
| >
| > In another tree entirely "git submodule status" says
| >   b4d0c0... libraries/Cabal
| > which looks right, because that commit does futz with
| > showInstalledPackageInfoField.
| >
| > So it looks as if my main GHC repo somehow has the wrong commit for
| Cabal.
| > How do I make it right?
| >
| > This is so frustrating.  Thanks
| >
| > Simon
|


Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Ian Lynagh-2

Hi Simon,

On Thu, May 09, 2013 at 12:31:22PM +0000, Simon Peyton-Jones wrote:
> Afraid not. I'd tried "git submodule update".  The command you give is a no-op; libraries/Cabal is stuck on commit 14c5a3f; and that's what git submodule status says it should be.  But it shouldn't!

What does

    git log -p libraries/Cabal

say?


Thanks
Ian



Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Patrick Palka
In reply to this post by Simon Peyton Jones
Are you by any chance on a non-'master' branch of GHC? This happened to me
when I ran `./sync-all pull` when on a local branch. There may be a simpler
fix, but this is what worked for me:

1. `git checkout master`
2. `./sync-all pull`
3. `git checkout local_branch`
4. `git rebase master`

The goal is to run `./sync-all pull` on the master branch and then to
rebase your local branch against it. This should update the submodule
metadata in your local branch.


On Thu, May 9, 2013 at 8:31 AM, Simon Peyton-Jones <simonpj at microsoft.com>wrote:

> Afraid not. I'd tried "git submodule update".  The command you give is a
> no-op; libraries/Cabal is stuck on commit 14c5a3f; and that's what git
> submodule status says it should be.  But it shouldn't!
>
> S
>
> | -----Original Message-----
> | From: Jan Stolarek [mailto:jan.stolarek at p.lodz.pl]
> | Sent: 09 May 2013 13:21
> | To: ghc-devs at haskell.org
> | Cc: Simon Peyton-Jones
> | Subject: Re: Stuck again on submodules
> |
> | Does this help:
> |
> | git submodule update libraries/Cabal/
> |
> | ?
> |
> | Janek
> |
> |
> |
> | Dnia czwartek, 9 maja 2013, Simon Peyton-Jones napisa?:
> | > Help!  I can't build ghc!
> | >
> | > I get this
> | > utils/ghc-pkg/Main.hs:1160:24:
> | >     Not in scope: `showSimpleInstalledPackageInfoField'
> | >     Perhaps you meant `showInstalledPackageInfoField' (imported from
> | > Distribution.InstalledPackageInfo)
> | >
> | > And indeed, my libraries/Cabal is way behind
> | >
> | > simonpj at cam-05-unx:~/code/HEAD$ cd libraries/Cabal
> | > simonpj at cam-05-unx:~/code/HEAD/libraries/Cabal$ git log -1 commit
> | > 14c5a3f78c00772cf54c2fd5c920a64d53e6f594
> | > Author: Gabor Greif <ggreif at gmail.com>
> | > Date:   Wed Mar 20 22:27:15 2013 +0100
> | >
> | >             Fix typos
> | >
> | > "git submodule status" says
> | > 14c5a3f78c00772cf54c2fd5c920a64d53e6f594 libraries/Cabal
> | > (1_10_branch_forked-1682-g14c5a3f)
> | > 1f9f7175e747aad7c424f5b12be5b95f15286f0b
> | > libraries/Win32 (2009-06-25-50-g1f9f717) ...etc
> | >
> | > In another tree entirely "git submodule status" says
> | >   b4d0c0... libraries/Cabal
> | > which looks right, because that commit does futz with
> | > showInstalledPackageInfoField.
> | >
> | > So it looks as if my main GHC repo somehow has the wrong commit for
> | Cabal.
> | > How do I make it right?
> | >
> | > This is so frustrating.  Thanks
> | >
> | > Simon
> |
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130509/4c6cbd13/attachment-0001.htm>

Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Simon Peyton Jones
In reply to this post by Ian Lynagh-2
aha, good catch.  It looks as if my commit for cardinality analysis somehow jiggered the Cabal tree.  I have no idea how or why.  

How can I undo that?

Simon

git log -p libraries/Cabal
commit ae3e14b731c976d7b8f7adc2c0f613db834c5ef1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri May 3 14:50:58 2013 +0100

    Implement cardinality analysis
   
    This major patch implements the cardinality analysis described
    in our paper "Higher order cardinality analysis". It is joint
...snip...

diff --git a/libraries/Cabal b/libraries/Cabal
index b4d0c0f..14c5a3f 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit b4d0c0f2846542dc2e2df189fe145a56ac9b30b6
+Subproject commit 14c5a3f78c00772cf54c2fd5c920a64d53e6f594

commit 0c3a9679286eb96e87905b038bf706734aed3922
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Apr 28 21:58:16 2013 +0100

    Update Cabal


| -----Original Message-----
| From: Ian Lynagh [mailto:ian at well-typed.com]
| Sent: 09 May 2013 13:40
| To: Simon Peyton-Jones
| Cc: ghc-devs at haskell.org
| Subject: Re: Stuck again on submodules
|
|
| Hi Simon,
|
| On Thu, May 09, 2013 at 12:31:22PM +0000, Simon Peyton-Jones wrote:
| > Afraid not. I'd tried "git submodule update".  The command you give is
| a no-op; libraries/Cabal is stuck on commit 14c5a3f; and that's what git
| submodule status says it should be.  But it shouldn't!
|
| What does
|
|     git log -p libraries/Cabal
|
| say?
|
|
| Thanks
| Ian



Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Simon Peyton Jones
In reply to this post by Patrick Palka
no, I'm on master

From: Patrick Palka [mailto:patrick at parcs.ath.cx]
Sent: 09 May 2013 13:42
To: Simon Peyton-Jones
Cc: Jan Stolarek; ghc-devs at haskell.org
Subject: Re: Stuck again on submodules

Are you by any chance on a non-'master' branch of GHC? This happened to me when I ran `./sync-all pull` when on a local branch. There may be a simpler fix, but this is what worked for me:

1. `git checkout master`
2. `./sync-all pull`
3. `git checkout local_branch`
4. `git rebase master`

The goal is to run `./sync-all pull` on the master branch and then to rebase your local branch against it. This should update the submodule metadata in your local branch.

On Thu, May 9, 2013 at 8:31 AM, Simon Peyton-Jones <simonpj at microsoft.com<mailto:simonpj at microsoft.com>> wrote:
Afraid not. I'd tried "git submodule update".  The command you give is a no-op; libraries/Cabal is stuck on commit 14c5a3f; and that's what git submodule status says it should be.  But it shouldn't!

S

| -----Original Message-----
| From: Jan Stolarek [mailto:jan.stolarek at p.lodz.pl<mailto:jan.stolarek at p.lodz.pl>]
| Sent: 09 May 2013 13:21
| To: ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
| Cc: Simon Peyton-Jones
| Subject: Re: Stuck again on submodules
|
| Does this help:
|
| git submodule update libraries/Cabal/
|
| ?
|
| Janek
|
|
|
| Dnia czwartek, 9 maja 2013, Simon Peyton-Jones napisa?:
| > Help!  I can't build ghc!
| >
| > I get this
| > utils/ghc-pkg/Main.hs:1160:24:
| >     Not in scope: `showSimpleInstalledPackageInfoField'
| >     Perhaps you meant `showInstalledPackageInfoField' (imported from
| > Distribution.InstalledPackageInfo)
| >
| > And indeed, my libraries/Cabal is way behind
| >
| > simonpj at cam-05-unx:~/code/HEAD$ cd libraries/Cabal
| > simonpj at cam-05-unx:~/code/HEAD/libraries/Cabal$ git log -1 commit
| > 14c5a3f78c00772cf54c2fd5c920a64d53e6f594
| > Author: Gabor Greif <ggreif at gmail.com<mailto:ggreif at gmail.com>>
| > Date:   Wed Mar 20 22:27:15 2013 +0100
| >
| >             Fix typos
| >
| > "git submodule status" says
| > 14c5a3f78c00772cf54c2fd5c920a64d53e6f594 libraries/Cabal
| > (1_10_branch_forked-1682-g14c5a3f)
| > 1f9f7175e747aad7c424f5b12be5b95f15286f0b
| > libraries/Win32 (2009-06-25-50-g1f9f717) ...etc
| >
| > In another tree entirely "git submodule status" says
| >   b4d0c0... libraries/Cabal
| > which looks right, because that commit does futz with
| > showInstalledPackageInfoField.
| >
| > So it looks as if my main GHC repo somehow has the wrong commit for
| Cabal.
| > How do I make it right?
| >
| > This is so frustrating.  Thanks
| >
| > Simon
|

_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
http://www.haskell.org/mailman/listinfo/ghc-devs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130509/4d47a475/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

Stuck again on submodules

Ian Lynagh-2
In reply to this post by Simon Peyton Jones
On Thu, May 09, 2013 at 12:44:45PM +0000, Simon Peyton-Jones wrote:
> aha, good catch.  It looks as if my commit for cardinality analysis somehow jiggered the Cabal tree.  I have no idea how or why.  
>
> How can I undo that?

I think this will do it:

cd libraries/Cabal
git reset --hard b4d0c0f2846542dc2e2df189fe145a56ac9b30b6
cd ../..
git commit -a --amend

assuming that "Implement cardinality analysis" is the latest patch.


If it's not the latest patch, then you'll either have to do some
rebasing, or just record a new patch instead of amending.


Thanks
Ian