
Herbert says (in bold font) "do not ever use sync-all", in this post http://www.reddit.com/r/haskell/comments/2hes8m/the_ghc_source_code_contains.... If that's really true, we should either nuke it altogether, or change it to do something correct. The idea that it might "set up your tree in subtly different ways" is alarming. Simon

On 10/02/2014 08:49 AM, Simon Peyton Jones wrote:
Herbert says (in bold font) "do not ever use sync-all", in this post http://www.reddit.com/r/haskell/comments/2hes8m/the_ghc_source_code_contains....
If that's really true, we should either nuke it altogether, or change it to do something correct. The idea that it might "set up your tree in subtly different ways" is alarming.
Simon
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
This is news to me, I always use sync-all get && sync-all pull when I have to… I'd appreciate if such things were announced on lists rather than a comment on reddit somewhere… -- Mateusz K.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Herbert, you are still not making the case for why we are keeping it. In fact, you are doing quite the opposite! The wiki[0] appears to no longer tell you to use sync-all when obtaining sources, however, it seems sync-all is still to be used when making local clones -- why? The sync-all entry[1] on the wiki says that "you normally don't need it anymore". What does this mean? What abnormal situations are there where we need to use it? [0] https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources [1] https://ghc.haskell.org/trac/ghc/wiki/Building/SyncAll - -- Alexander alexander@plaimi.net https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlQtC6UACgkQRtClrXBQc7WubAEAqX+yflipFfpYDBdTm8pO1+Oe 9i/yxmIB6vzFl0Hf1PsA/iaiNXyxoy0O0lCTCB6u500CywvPq4GA8Ieg0PucBizB =VU62 -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I just realised I might have answered my last question with the observation that you're supposed to use it for local clones. But further clarification would still be appreciated. Thanks. - -- Alexander alexander@plaimi.net https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlQtC/EACgkQRtClrXBQc7XnlQD/blKknLWHDHf0BWF2zcKrePnC i0dVPPDkAx5F43+6blYA/0C1xz7JyU6wAwMvo9OKyDVM4kV9GdX/egbunxuehKK3 =lS6d -----END PGP SIGNATURE-----

On 2014-10-02 at 09:49:11 +0200, Simon Peyton Jones wrote:
Herbert says (in bold font) "do not ever use sync-all", in this post http://www.reddit.com/r/haskell/comments/2hes8m/the_ghc_source_code_contains....
If that's really true, we should either nuke it altogether, or change it to do something correct. The idea that it might "set up your tree in subtly different ways" is alarming.
To clarify what I mean by that: For users just wanting to clone ghc.git now and just wanting to keep their tree updated, I'd recommend doing the following one-shot convenience configuration setup (see [1] for more details): git config --global alias.pullall '!f(){ git pull "$@" && git submodule update --init --recursive; }; f' And then clone simply via git clone --recursive http://ghc.haskell.org/ghc.git (or use https:// or git:// or whatever) and to keep the tree simply use git pullall --rebase (`pullall` just saves you from having to call `git pull`+`git submodule update --init` yourself) In contrast, `sync-all` is a multi-step process: 1.) you need to clone ghc.git, 2.) then you have a sync-all, which when called will `git submodule init` (which doesn't yet download the submodules) 3.) rewrites the fetch-urls in each initialised submodule 4.) finally calls `git submodule update` to fetch the submodule and checkout the commits registered in ghc.git The difference become apparent when wanting to use github instead; my recommended approach is to use the URL rewriting feature of GitHub which even allows you to easily switch between git.haskell.org and github.com with a single command, or in its simpler form (as described on [2]): Only needed once, and idempotent setup step: git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ And then just as before: git clone --recursive git://github.com/ghc/ghc So long story short; I've mostly got a bad gut feeling recommending to use a 1000-line Perl script http://git.haskell.org/ghc.git/blob/HEAD:/sync-all to accomplish what the 2 `git config` commands and the the day-to-day `git` commands I mentioned in this email can do in a more Git-idiomatic way. So I'm not saying `sync-all` is doing something wrong, but rather that's overly complex for the task at hand, and we've had support issues with `sync-all` due to subtle bugs in it (just check the git history for sync-all to see the tweaks we needed). Moreover, IMHO, if someone's already proficient with Git, telling them to use `sync-all` will rather confuse than help as it's not that transparent what it really does. [1]: https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules#Usin... [2]: https://ghc.haskell.org/trac/ghc/wiki/Newcomers

Herbert Valerio Riedel wrote:
So I'm not saying `sync-all` is doing something wrong, but rather that's overly complex for the task at hand, and we've had support issues with `sync-all` due to subtle bugs in it (just check the git history for sync-all to see the tweaks we needed). Moreover, IMHO, if someone's already proficient with Git, telling them to use `sync-all` will rather confuse than help as it's not that transparent what it really does.
So why not turn the current 1000 line Perl script with two lines of shell script and some comments? Erik (who uses sync-all because he didn't know any better) -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
participants (5)
-
Alexander Berntsen
-
Erik de Castro Lopo
-
Herbert Valerio Riedel
-
Mateusz Kowalczyk
-
Simon Peyton Jones