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

Issue 593154 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Confused output on changing VS versions with GN

Project Member Reported by scottmg@chromium.org, Mar 8 2016

Issue description

[metro-mode-39]d:\src\cr3\src>gn gen //out/Debug "--args=is_debug=true is_component_build=true enable_nacl=false is_chrome_branded=true symbol_level=2 target_cpu=\"x86\"" --check
ERROR at dynamically parsed input that //build/config/win/visual_studio_version.gni:29:7 loaded :1:42: Invalid token.
Calculating hash of toolchain in vs_files\4087e065abebdca6dbd0caca2910c6718d2ec67f. Please wait...
                                         ^
I have no idea what this is.



I'm not sure exactly on the repro, but I think have GYP_MSVS_VERSION unset, generate, and then set it to 2015. Maybe.

Either way, it's not good that that output is getting into a gn file.
 
Sounds like something is getting logged to stdout that shouldn't be ...
Labels: Te-NeedsFurtherTriage
I'm not sure if this is the same bug or a different one, but jonross@ and I have been hitting this:

C:\src\chromium4\src>gn args out\Debug_gn_component
Waiting for editor on "C:\src\chromium4\src\out\Debug_gn_component\args.gn"...
Generating files...
ERROR at dynamically parsed input that //build/config/win/visual_studio_version.gni:29:7 loaded :2:12: Newline in string constant.
sdk_path = "C:\Program Files (x86)\Windows Kits\10\"
           ^-----------------------------------------

This gets repackaged as sdk_path = "C:\Program Files (x86)\Windows Kits\10\", like this:

> python build\vs_toolchain.py get_toolchain_dir
  vs_path = "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
  sdk_path = "C:\Program Files (x86)\Windows Kits\10\"
  vs_version = "2015"
  wdk_dir = ""
  runtime_dirs = "None"

and the gn parser gets confused (see Tokenizer::AdvanceToEndOfToken) and reports a newline in string constant.

crrev.com/1827663002 is a possible fix.
I meant to say that this only happens when DEPOT_TOOLS_WIN_TOOLCHAIN=0.
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 23 2016

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

commit 12bbca48cda56b2a10a68f8f69bb90906189c4bf
Author: brucedawson <brucedawson@chromium.org>
Date: Wed Mar 23 00:58:06 2016

Strip trailing backslashes from vcvarsall results

When building with DEPOT_TOOLS_WIN_TOOLCHAIN=0 the vs_toolchain.py
script uses environment variables set up by vcvarsall.bat, such as
WINDOWSSDKDIR. The default value of this with VS 2015 is
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\ - note the
trailing slash.

When ninja runs "build\vs_toolchain.py get_toolchain_dir" it translates
this to:

sdk_path = "C:\Program Files (x86)\Windows Kits\10\"

The trailing slash in front of the quote confuses the gn parser. This
change strips those trailing slashes. For more details see the gn
docs:

https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md#Strings

BUG=593154

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

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

[modify] https://crrev.com/12bbca48cda56b2a10a68f8f69bb90906189c4bf/build/vs_toolchain.py

Any idea whether this is fixed now? If there are no more known reproes then I'm closing this as fixed.

Comment 8 by sshru...@google.com, Mar 24 2016

Status: Fixed (was: Unconfirmed)
scottmg@, as you still able to repro this issue?
Status: Available (was: Fixed)
Pretty sure #4 is unrelated to the initial report. The initial one is because get_toolchain_if_necessary prints "Calculating hash of toolchain..." now.
Components: Build
Labels: -Proj-GN-Migration -Te-NeedsFurtherTriage
I don't think this blocks the GN migration.
Project Member

Comment 11 by sheriffbot@chromium.org, Apr 20 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment