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

Issue 759088 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Task



Sign in to add a comment

*_strings.grdp files should be able to catch incorrect tags

Project Member Reported by jsaul@google.com, Aug 25 2017

Issue description

Here's a sample of the constants found in the <if expr=""> section of *_strings.grdp files:

is_linux
is_macosx
is_win
is_android
is_ios
chromeos
_google_chrome

The absence of "is_" in front of the chromeos one was the source of a recently-found bug where "is_chromeos" was being used but ignored.  There doesn't seem to be very good consistency to these.

Question: Can these problems be caught at compile-time?
 

Comment 1 by jsaul@google.com, Aug 25 2017

Cc: szhangcs@google.com se...@chromium.org jsaul@google.com
Owner: ma...@chromium.org
I know this is across Chromium, but our original bug was in autofill_strings.grdp...so assigning to mathp@ for triage. :)

Comment 2 by ma...@chromium.org, Aug 30 2017

Owner: thestig@chromium.org
Sending this over to an owner in grit, in case they would like to fix!
Well, there's more possible values that go into expressions than just the above list. e.g. chrome/browser/browser_resources.grd has enable_extensions, and it allows {"not","and","or"} as keywords too.

Sometimes, grit will receive something like -D enable_plugins=true vs -D enable_plugins=false, but other times, it either receives -D toolkit_views, or it does not receive that argument at all. Given this example, if a .grd entry contains <if expr="toolkit_views"> on a platform that does not use Views, it cannot reject that as incorrect. Similarly, it's not obvious to grit, based on just the -D arguments, if "chromeos" is a valid expression or not.

So if someone wants to implement a check, they probably have to create (and maintain) a list of known expression values, feed that list in to grit, and have grit check the expressions against the list.
Cc: flackr@chromium.org thestig@chromium.org thakis@chromium.org
Owner: ----
Status: Available (was: Untriaged)
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 31

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment