You can disable automatic running of gyp by using the GYP_CHROMIUM_NO_ACTION env var but that doesn't mean gn will run. Maybe add a custom hook for running gn?
Dumb question: is there an easy way to make gclient runhooks automatically use GN instead of GYP?PK
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
VS projects are regenerated as well when you run 'ninja'. It works for ninja invocation from shell and also when Build command is used from VS.
Ninja runs 'gn gen' only if there's a need to regenerate. Also GN doesn't rewrite Visual Studio project/solution files unless the new contents of the file is different. For instance project file changes when you add/remove source files which is expected behavior.
--
The problem is that gn is designed to work with an arbitrary number of arbitrarily named output directories, rather than a fixed number of default-named ones, and so "just run gn" in gclient sync is tricky - which directories do you run it for?
On Fri, Mar 11, 2016 at 3:47 AM, Tomasz Moniuszko <tmoni...@opera.com> wrote:Ninja runs 'gn gen' only if there's a need to regenerate. Also GN doesn't rewrite Visual Studio project/solution files unless the new contents of the file is different. For instance project file changes when you add/remove source files which is expected behavior.Yes, and that's precisely what I'm saying is a problem. My workflow is:git pullgclient syncdevenv build/all.sln &<Build from inside Visual Studio>This is now broken since basically every time I sync, there will be project file changes needed, but these won't have been made by the time I load Visual Studio. And you really, REALLY do not want to change these when Visual Studio is already loaded. It's a good way to have your computer locked up for ten minutes.
--
I think, at least for the moment, we're better off doing nothing in runhooks and you should use a wrapper script to play around with things and see how they work. And, we can get more experience with how many people end up using the IDE integration and what sorts of issues they hit. If we see enough issues that we think it makes sense to solve something generically.How does that sound? We should also file a bug and track further discussion there ...
I'm happy to provide assistance, but I don't particularly want to provide assistance for only one tiny inflexible situation :). I also would guess that most people have more than one build directory (at the very least, debug + release). Lastly, in my experience, env vars are the worst of all possible ways to configure the build and checkout process, so I'm going to be pretty reluctant to pick only that solution.
On Fri, Mar 11, 2016 at 9:37 AM, Dirk Pranke <dpr...@chromium.org> wrote:I think, at least for the moment, we're better off doing nothing in runhooks and you should use a wrapper script to play around with things and see how they work. And, we can get more experience with how many people end up using the IDE integration and what sorts of issues they hit. If we see enough issues that we think it makes sense to solve something generically.How does that sound? We should also file a bug and track further discussion there ...I definitely don't think you should add a smart/complicated hook.I do think a dumb hook should be added. Reading a single environment variable that passes all necessary options to gn would be sufficient. Wrapper scripts are just enough extra work to be problematic; I've tried to solve various other problems (e.g. good git<->devenv text editor integration) using wrapper scripts and it makes for major hassles every time I set up a new machine, which happens surprisingly frequently. It's a lot easier to document a single environment variable string on dev.chromium.org for those of us who really, really do not like to do things from CLIs.
You have a set of three actions you run on a regular basis. You want it to do something else also. Your proposed solution is to add a global hook to DEPS that will run for all Windows users (there's no more granular way to specify hooks) that will execute a script that somebody writes and checks in that looks for a global environment variable you set on your computer that it interprets as a sequence of directories and command line flags such that when you run step 2 in your sequence it automatically run some additional set of commands.I would suggest that even if this problem was more severe, the solution would not be to add more obscure and unmaintained variables to DEPS but to just write a script to do the sequence of steps you want. This will even be better for yourself selfishly, since the script will be much easier to edit than some environment variable.
--
On Fri, Mar 11, 2016 at 11:28 AM, Brett Wilson <bre...@chromium.org> wrote:You have a set of three actions you run on a regular basis. You want it to do something else also. Your proposed solution is to add a global hook to DEPS that will run for all Windows users (there's no more granular way to specify hooks) that will execute a script that somebody writes and checks in that looks for a global environment variable you set on your computer that it interprets as a sequence of directories and command line flags such that when you run step 2 in your sequence it automatically run some additional set of commands.I would suggest that even if this problem was more severe, the solution would not be to add more obscure and unmaintained variables to DEPS but to just write a script to do the sequence of steps you want. This will even be better for yourself selfishly, since the script will be much easier to edit than some environment variable.Scripts are so much not easier for me to edit than environment variables. I literally know zero shell scripting. Or python, or perl, or any other suitable substitute. I can make this happen, it's just stunningly slow.
Yes, every individual developer who does this can instead write scripts, modify their workflow, etc. And if the overhead of a dumb hook was really so drastic, that tradeoff would probably make more sense to me. But I feel like your description above goes out of its way to make this sound as difficult and obfuscated as possible, and portray this request as unreasonable.