<html><head><style id="css_styles" type="text/css"><!--blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
table { border-collapse: collapse; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] { list-style-position: inside;}
body { font-family: 'Segoe UI'; font-size: 12pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
--></style></head><body><div>Hi,</div><div><br /></div><div>I also frequently encounter these errors.</div><div>I think they are caused by me copying from an ancient local clone, one that still has historic account of when hadrian used to live in its own submodule.</div><div>Recently, the hadrian system vendored Cabal into hadrian/vendored/Cabal, but the root repository had still listed a submodule at .git/modules/hadrian, explaining the error.</div><div>Indeed, just removing the ancient .git/modules/hadrian is the solution.</div><div><br /></div><div>Note that the vendored submodule means you cannot easily check out a branch from ... 5 years (?) ago, because then you will get the reverse error.</div><div>Fresh clones should not be affected.</div><div><br /></div><div>Cheers,<br />Sebastian</div>
<div style="clear:both"><br /></div>
<div><br /></div>
<div>
<div>------ Originalnachricht ------</div>
<div>Von "Arnaud Spiwack" <<a href="mailto:arnaud.spiwack@tweag.io">arnaud.spiwack@tweag.io</a>></div>
<div>An "Matthew Pickering" <<a href="mailto:matthewtpickering@gmail.com">matthewtpickering@gmail.com</a>></div>
<div>Cc "GHC developers" <<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a>></div>
<div>Datum 02.08.2024 15:27:23</div>
<div>Betreff Re: Can't initialise vendored submodule</div></div><div><br /></div>
<div id="xa6a264c136374f9"><blockquote cite="CAGwnsnn2jJtZrSmzuL-G6WxHkifBarMeJWNEy6t2PcHiyxL7Kg@mail.gmail.com" type="cite" class="cite2">
<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks Matthew, this helped me find the solution.</div><div><br /></div><div>Which, is turn out, was simply to remove the old directory:</div><div><br /></div>$ rm -rf .git/modules/hadrian/</div><div dir="ltr"><br /></div><div>It's not removed by `git submodule desync` or any command that I could find (though, now that I think about it, I didn't try to garbage collect the repo, so maybe?). But it's sound to just delete, as far as I can tell: it's just a cache.<br /></div></div><div dir="ltr"><br /></div><div dir="ltr">> The usage of submodules in `hadrian/vendored` is a standard usage.</div><div dir="ltr"><br /></div><div>This goes to show that I was at least right when saying that submodules are wonky :D .<br /></div><div dir="ltr"><br /></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 2 Aug 2024 at 12:11, Matthew Pickering <<a href="mailto:matthewtpickering@gmail.com">matthewtpickering@gmail.com</a>> wrote:<br /></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>It seems you might have a some very old configuration from when hadrian used to be a submodule? Perhaps a fresh clone would help things along?</div><div><br /></div><div>The usage of submodules in `hadrian/vendored` is a standard usage.</div><div><br /></div><div>Cheers,</div><div><br /></div><div>Matt<br /></div></div><br /><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2024 at 11:08 AM Vaibhav Sagar <<a href="mailto:vaibhavsagar@gmail.com">vaibhavsagar@gmail.com</a>> wrote:<br /></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">I think you want --recursive</p>
<br /><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 2 Aug 2024, 8:05 pm Arnaud Spiwack, <<a href="mailto:arnaud.spiwack@tweag.io">arnaud.spiwack@tweag.io</a>> wrote:<br /></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear all,<br /></div><div><br /></div><div>I'm currently unable to build GHC's master branch as some of the submodules (presumably used by Hadrian) are making git pretty unhappy (I've used various variants of the command below, in a cleaned repository):<br /></div><div><br /></div><div>```console<br /></div><div>$ git submodule update --init</div>error: submodule git dir '/home/aspiwack/projects/tweag/ghc/master/.git/modules/hadrian/vendored/Cabal' is inside git dir '/home/aspiwack/projects/tweag/ghc/master/.git/modules/hadrian'<br />fatal: refusing to create/use '/home/aspiwack/projects/tweag/ghc/master/.git/modules/hadrian/vendored/Cabal' in another submodule's git dir<br />Failed to clone 'hadrian/vendored/Cabal'. Retry scheduled<br />error: submodule git dir '/home/aspiwack/projects/tweag/ghc/master/.git/modules/hadrian/vendored/Cabal' is inside git dir '/home/aspiwack/projects/tweag/ghc/master/.git/modules/hadrian'<br />fatal: refusing to create/use '/home/aspiwack/projects/tweag/ghc/master/.git/modules/hadrian/vendored/Cabal' in another submodule's git dir<br />Failed to clone 'hadrian/vendored/Cabal' a second time, aborting<br />```<br clear="all" /><div><br /></div><div>Please advise on how to get unblocked.</div><div><br /></div><div>And, if I'm allowed to conclude with a plea: please be careful not to abuse Git's submodule system, it's wonky enough when used simply.<br /></div><div><br /></div><span class="gmail_signature_prefix">-- </span><br /><div dir="ltr" class="gmail_signature"><div dir="ltr">Arnaud Spiwack<br />Director, Research at <a href="https://moduscreate.com" rel="noopener noreferrer noreferrer">https://moduscreate.com</a> and <a href="https://tweag.io" rel="noopener noreferrer noreferrer">https://tweag.io</a>.</div></div></div>
_______________________________________________<br />
ghc-devs mailing list<br />
<a href="mailto:ghc-devs@haskell.org" rel="noreferrer">ghc-devs@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br />
</blockquote></div>
_______________________________________________<br />
ghc-devs mailing list<br />
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br />
</blockquote></div>
</blockquote></div><br clear="all" /><br /><span class="gmail_signature_prefix">-- </span><br /><div dir="ltr" class="gmail_signature"><div dir="ltr">Arnaud Spiwack<br />Director, Research at <a href="https://moduscreate.com" rel="noopener noreferrer">https://moduscreate.com</a> and <a href="https://tweag.io" rel="noopener noreferrer">https://tweag.io</a>.</div></div></div>
</blockquote></div>
</body></html>