New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 595915 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

gn gen failing at trunk with --ide=vs

Project Member Reported by jam@chromium.org, Mar 17 2016

Issue description

I just synced and now get this build error on Windows:

D:\src\chrome1\src>ninja -C out\Debug_gn_component chrome
ninja: Entering directory `out\Debug_gn_component'
[1/1] Regenerating ninja files
FAILED: D:/src/chrome1/src/buildtools/win/gn.exe --root=D:/src/chrome1/src -q --ide=vs gen //out/Debug_gn_component/
ERROR Visual Studio doesn't support 'gfx_unittests_bundle_data' target output type: Bundle data
ninja: error: rebuilding 'build.ninja': subcommand failed

I had to manually run "gn gen out\Debug_gn_component" (i.e. without --ide=vs) to be able to build.
 
Cc: sdefresne@chromium.org
It sounds like the --ide=vs and bundle_data things are both quite new and not likely tested in conjunction, this doesn't sound all that surprising ...
though we should probably at least add some unit tests to check for this along with a fix.

Comment 3 by agrieve@google.com, Mar 18 2016

bundle_data is an iOS / mac thing, no? Might just need to put it behind an if (mac || ios)
We could do that, or we could leave it generic and fix the ide generator. It kinda seems like we should fix the generator regardless. 
Regarding #3, I initially put them behind "if (is_ios || is_mac)" and was asked by my reviewers to move them out as this would make the BUILD.gn file easier to read (less conditional) since bundle_data is a no-op on all platform that do not use create_bundle (which is itself hidden in templates behind "if (is_ios)").

I think we should fix fix "gn gen --ide=vs" to support bundle_data since I plan to extend the ide generator to support Xcode and at that point I'll need to support bundle_data.
Cc: tmonius...@opera.com
Owner: sdefresne@chromium.org
Status: Started (was: Assigned)

Comment 7 by brettw@chromium.org, Mar 18 2016

Yeah, I agree we should do the trivial fix to make this a NOP for the VS generator.
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a90c62f80a74f7abc647234f70ac596e86bf3dd2

commit a90c62f80a74f7abc647234f70ac596e86bf3dd2
Author: sdefresne <sdefresne@chromium.org>
Date: Sat Mar 19 13:34:28 2016

[GN] Fix "gn gen --ide=vs" to ignore bundle_data targets.

In order to keep the BUILD.gn more readable by avoiding conditionals,
Chromium defines bundle_data on every platforms (as in the absence of
create_bundle they are just no-op stamp targets).

Fix "gn gen --ide=vs" to ignore bundle_data targets but not the
create_bundle targets (as there should be no such targets on Windows).

BUG= 595915 

Review URL: https://codereview.chromium.org/1811203003

Cr-Commit-Position: refs/heads/master@{#382197}

[modify] https://crrev.com/a90c62f80a74f7abc647234f70ac596e86bf3dd2/tools/gn/visual_studio_writer.cc

Comment 9 by mfo...@chromium.org, Mar 22 2016

I'm getting a failure on bundle_data for the Clank build.  Is it related to this bug or should it be filed separately?

[mfoltz@sebastian /usr/local/google/home/mfoltz/clank/src]$  gn args out/Default
Waiting for editor on "/media/ssd2/mfoltz/clank/src/out/Default/args.gn"...
Waiting for Emacs...
Generating files...
ERROR at //sql/BUILD.gn:72:1: Unknown function.
bundle_data("sql_unittests_bundle_data") {
^----------

args.gn:

target_os = "android"
target_cpu = "arm"  # (default)
is_debug = true  # (default)

# Other args you may want to set:
is_component_build = true
is_clang = true
symbol_level = 1  # Faster build with fewer symbols. -g1 rather than -g2
#enable_incremental_javac = true  # Much faster; experimental


@mfoltz - that looks like you have an out-of-date GN binary. Make sure you have run `gclient runhooks` recently; if the problem persists, delete the src/buildtools directory and re-run `gclient runhooks` again.

Comment 11 by jam@chromium.org, Mar 23 2016

I'm now getting a different failure:
ERROR Visual Studio doesn't support 'test_support_bundle_data' target output type: Bundle data

Is this because it also needs to ignore test_support_bundle_data along with bundle_data? Given that we just had another regression after the previous fix, is there anyway we can have a simple test to ensure that gn gen --ide=vs doesn't break?

Comment 12 by jam@chromium.org, Mar 23 2016

oh nvm, I see that test_support_bundle_data is still a "bundle_data" type. However depot_tools is up to date for me (latest revision is from Wed Mar 23 09:52:51 2016 +0000) and I'm still seeing this?

Comment 13 by jam@chromium.org, Mar 23 2016

also my buildtools/win is from 3/14 so it has the latest change from Dirk (https://codereview.chromium.org/1786503003)
Re: c#10

That makes sense since I'm also hitting crbug.com/579176 which is preventing me from running gclient runhooks.  Thanks



The --ide=vs fix for bundle_data didn't land until 3/19 (https://codereview.chromium.org/1811203003) and hasn't been rolled into chromium yet. 

I can do a roll today.

Comment 16 by jam@chromium.org, Mar 23 2016

ah, got it thanks. I thought it was already rolled in per 10.
Status: Fixed (was: Started)
This is rolled in now (assuming the roll sticks).

Sign in to add a comment