Forwarding since Matthew isnt subscribed. On 29.11.2010, at 18:15, Matthew Weier O'Phinney wrote:
> -- Lukas Kahwe Smith <[email protected]> wrote > (on Sunday, 28 November 2010, 11:00 PM +0100): >> Hi Matthew, >> >> So right now from my understanding Symfony2 only depends on Zend\Log. >> Not sure if Zend\Cache is still planned to be used or not. Currently >> the symfony sandbox uses these scripts to manage the vendors: >> https://github.com/symfony/symfony-sandbox/tree/master/bin/ >> >> Not sure if Fabien has other plans for the future. Either way I think >> it would be good to have a solution for ZF2 where people can choose to >> pull in just the dependency for core to get things to work. Of course >> if they want the rest then they should be able to get everything >> (though in that case they probably also do not want the demos or >> documentation stuff). >> >> I am aware of the plans to create a packager, but right now at least >> all the other deps are pulled in via git/svn. Not being a SCM wizard, >> especially when it comes to git, I do not have the perfect solution, >> but the current sandbox setup seems very annoying: >> - setting up or resetting the vendor dir takes ages >> - deploying code takes ages >> - mucking around with the IDE to prevent ZF2 from "polluting" the >> autocomplete > > There are a number of ways to slurp in and track 3rd party libraries > using git. The most obvious is submodules, but since these pull in the > *entire* repository, they're often a pain if the repository includes > more than just source code. (We chose not to split off tests, library, > demos, etc. as we want to encourage patches to include both code and > tests, and documentation if the change warrants it -- and splitting over > multiple repositories leads to a troublesome commit workflow.) > > The one reliable way I've found is using a tool called "git subtree", > available via GitHub (https://github.com/apenwarr/git-subtree). This > tool provides both the ability to cherry-pick subtrees of a project into > branches, as well as to track those branches elsewhere. > > The following workflow is an example of using git subtree to track just > the library/Zend/Log tree of the ZF2 repository. It's heavy on setup, > but once done, is relatively easy to maintain. > > Get and install git-subtree: > - Clone from https://github.com/apenwarr/git-subtree > - Add git-subtree.sh to git libexec directory, or create alias in git > config; follow INSTALL in project > Clone ZF2 repo: > - http://github.com/zendframework/zf2.git > - Fetch locally: git clone > Create subtree branch: > - W/in cloned ZF2 repo, "split" the subtree into a new branch: > - git subtree split --prefix=library/Zend/Log --annotate="[zend_log] " > --rejoin -b zf2/zend_log > - Verify new branch created: get checkout zf2/zend_log && ls > - Push branch to your fork: git push origin zf2/zend_log > Merge subtree into your project: > - Fetch subtree branch to HEAD: > git fetch http://github.com/<USERNAME>/zf2.git zf2/zend_log > - Merge the subtree into the current branch: > git subtree add --prefix=library/Zend/Log --squash FETCH_HEAD > - Verify a commit was made: git log > Keeping up-to-date: > - Keep your master ZF2 up-to-date: > - Add a remote for the ZF2 repo: > git remote add zf2 http://github.com/zendframework/zf2.git > - Rebase your master off of it: > git rebase zf2/master master > git push origin master > - Update the subtree (exact same syntax each time): > git subtree split --prefix=library/Zend/Log --annotate="[zend_log] " > --rejoin -b zf2/zend_log > git push origin zf2/zend_log > - Update your project's version of the subtree: > git subtree pull --prefix=library/Zend/Log > http://github.com/<USERNAME>/zf2.git zf2/zend_log > (verify with git log) > > As an example, I've created a "zf2/zend_log" branch on my own > repository: > > https://github.com/weierophinney/zf2/tree/zf2/zend_log > > This sort of task would likely be that of an integration manager, or a > lieutenant. > > As for dependencies, I'm working on a tool today that will, at the > minimum, recurse through a component directory and return a list of > other components on which it depends. Once this tool is ready, I'll let > Fabien know, so that you can use this to determine what other ZF2 > components you may need to treat in this same fashion in order to get > all dependencies in place. > > Now, that said: when we get further along in our milestones, you > *should* be able to simply grab the packages for the components you need > via PEAR, and push the specific versions into your tree -- making the > "git subtree" solution a temporary workaround until that is in place. > > -- > Matthew Weier O'Phinney > Project Lead | [email protected] > Zend Framework | http://framework.zend.com/ > PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc Lukas Kahwe Smith [email protected] -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
