Issue #30 wontfix

Setting global source tree to find MYUtilities is invasive

Jonathan Wight
created an issue

Being forced to create a source tree to include MYUtilities into the project is unusual, annoying, invasive and not sustainable.

Source Trees are NOT good solutions to external dependencies (outside of single organisations). Requiring people to use source-trees merely to include this chunk of code isn't a good idea. It would be better if you merely included the MYUtilities source inside the Murky project.

Hopefully future versions of mercurial will make these kinds of problems go away.

Comments (6)

  1. Jonathan Wight reporter

    A few issues:

    A) Fragile. Move the directory, source tree breaks. Yay. B) If every Xcode based Open Source project required source trees then the UI would suddenly become cluttered and would be a pain C) There are better/more convenient ways to do the same thing (direct embedding, symlinks, etc)

    No one is really benefiting from using source trees for this (except perhaps Jens?)

  2. Jens Alfke repo owner

    Could you explain why source trees are invasive / not good solutions / annoying / a bad idea? If you have any ideas about how they could be made to work better, I could pass those on to the people I know on the Xcode team.

    Having multiple copies of MYUtilities checked in would be a mess, especially for me and anyone else making changes to MYUtilities. Any changes made in one repo would have to be manually copied into all the others, resolving conflicts along the way; exactly the sort of thing that version control is supposed to fix.

    The only halfway-reasonable alternative is to use a relative path reference in Murky.xcodeproj pointing to something like "../MYUtilities/". I actually did that for a while, but I decided it was bad to force everyone to use the same directory layout (including me, on multiple machines.) Source trees are just a more flexible way of doing that, with an extra layer of indirection that lets you change a path in every project using it at once.

  3. Jens Alfke repo owner

    "A) Fragile. Move the directory, source tree breaks. Yay."

    Same is true of relative paths, except if it's MYUtilities being moved, you have to fix the path in every project that uses it, not just once.

    "B) If every Xcode based Open Source project required source trees then the UI would suddenly become cluttered and would be a pain"

    Dude, it's a scrolling list, and you can sort by name. It even supports type-select! I could see it handling thousands of projects without much inconvenience. (Not that I think any one person would be likely to have more than a dozen or two projects checked out.)

    "C) There are better/more convenient ways to do the same thing (direct embedding, symlinks, etc)"

    Direct embedding would be a terrible mess. See my previous comment. Symlinks are exactly as fragile as source trees, only they're not centralized so each one has to be fixed independently (see my previous comment.)

    You can keep arguing if you like, but it's not going to happen. I believe the current setup is the best option, and I'm not going to change it. You are welcome to apply any of your techniques to your checked-out Xcode project if they work better for you; just be careful not to get any of those changes into your bitbucket fork if you want me to pull from it.

  4. Jonathan Wight reporter

    "You can keep arguing if you like"

    • sigh*

    Of course, your project, run it how you like. But your approach is already broken. You're trying to emulate SVN externals without any of the smarts (e.g. linking directly to a tag). If any of the interfaces in MYUtilities ever have to change then suddenly your approach breaks. You're pretty much saying "Murky relies on any random version of MYUtilities the user happens to have hanging around on their drive".

    Of course there is no perfect solution until mercurial add sub-repositories or externals or whatever their solution will be. And until then your solution is as shit as any other. The only person benefiting from the source tree is you - because you don't have to manually merge in changes of MYUtilities.

  5. Log in to comment