I encountered something similar with WebRTC. It has a helpful message when you try to `git cl upload` (basically: you *must* create a separate checkout):
Creating CLs from this location is not supported! Please make sure the current working directory is the parent directory of this directory. If you're working with a Chromium checkout, you'll have to create a full WebRTC checkout and upload a CL from that. See https://webrtc.org/native-code/development/ for instructions. V8 has instructions here - https://github.com/v8/v8/wiki/Using%20Git - that seem up-to-date. (tl;dr: `fetch v8` should work) You might be able to save some electrons with something like $ mkdir v8 # at the level above your chromium/.gclient $ gclient-new-workdir.py chromium/src/v8 v8/v8 $ cd v8/v8 $ git checkout master $ cd .. $ cat -> .gclient solutions = [ { "url": "https://chromium.googlesource.com/v8/v8.git", "managed": False, "name": "v8", "deps_file": "DEPS", "custom_deps": {}, }, ] ^D That will symlink all the git objects for v8 so they're not re-downloaded, and share disk blocks. But you'll still get dupes of v8's DEPS. Getting much more creative probably risks wedging your chromium checkout into a weird state :/ On 16 December 2016 at 15:18, Matt Giuca <[email protected]> wrote: > Hi, > > TL;DR: How do you work on V8 (build, test and upload CLs) from within the > v8 subrepo of a Chromium checkout (without having to make a separate v8 > checkout)? > > I was helping Nick get started on V8 development within Chromium and we > couldn't find any way to run the presubmit from within the v8 directory > that's checked out inside the chromium repo. > > That is, we would like to be able to do: > ~/chrome/src$ cd v8/src > ~/chrome/src/v8/src$ git cl presubmit > > However, if you do that, you get: > > Traceback (most recent call last): > File "/usr/local/google/home/mgiuca/chrome/depot_tools/git_cl.py", line > 5654, in <module> > sys.exit(main(sys.argv[1:])) > File "/usr/local/google/home/mgiuca/chrome/depot_tools/git_cl.py", line > 5636, in main > return dispatcher.execute(OptionParser(), argv) > File "/usr/local/google/home/mgiuca/chrome/depot_tools/subcommand.py", > line 252, in execute > return command(parser, args[1:]) > File "/usr/local/google/home/mgiuca/chrome/depot_tools/git_cl.py", line > 4222, in CMDpresubmit > change=cl.GetChange(base_branch, None)) > File "/usr/local/google/home/mgiuca/chrome/depot_tools/git_cl.py", line > 1685, in RunHook > gerrit_obj=self._codereview_impl.GetGerritObjForPresubmit()) > File > "/usr/local/google/home/mgiuca/chrome/depot_tools/presubmit_support.py", > line 1247, in DoPresubmitChecks > results += executer.ExecPresubmitScript(presubmit_script, filename) > File > "/usr/local/google/home/mgiuca/chrome/depot_tools/presubmit_support.py", > line 1157, in ExecPresubmitScript > result = eval(function_name + '(*__args)', context) > File "<string>", line 1, in <module> > File "<string>", line 287, in CheckChangeOnCommit > File "<string>", line 260, in _CommonChecks > File "<string>", line 101, in _CheckUnwantedDependencies > ImportError: No module named checkdeps > > Turns out this is because the v8 directory is missing the buildtools > subdirectory which is checked out by its DEPS. Basically, when gclient > checks out all the subrepos of chrome (including v8) it doesn't recursively > check out the DEPS' DEPS. So we can't submit v8 from there and maybe some > other things are broken too. > > If you make a separate checkout of v8 (outside of chrome), and run gclient > sync, it's fine. But then you can't test your changes in Chrome, resulting > in tedious copying of git patch data back and forth between the two > checkouts of v8. It would be much better if you could just do the full v8 > edit/build/test/upload workflow from within the v8 checkout inside chrome. > > I don't want gclient to be recursive by default. I just want to be able to > set it up so it fetches v8. > > We found this old (looks obsolete) documentation describing exactly how to > do this: > http://www.chromium.org/developers/how-tos/chromium- > modularization#Advanced_Usage > > - It gives the example of v8 but then says "The V8 example is somewhat > simple since V8 does not itself have other dependencies." That's no longer > true since V8 *does* have other dependencies. This example doesn't get what > we want. > - Then it goes on to say how to do webkit (no longer applicable) and > get webkit's dependencies. But we tried setting up .gclient with v8 similar > to how webkit is set up there, and it didn't work. I won't go into the > details of how it didn't work (can discuss on request). > > How do you do this? I'd imagine most v8 engineers have a workflow that > solves this problem. There must be a way to have gclient check out the DEPS > of v8 without needing to make a separate v8 checkout. > > Thanks > > Matt & Nick > > -- > -- > Chromium Developers mailing list: [email protected] > View archives, change email options, or unsubscribe: > http://groups.google.com/a/chromium.org/group/chromium-dev > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
