*_strings.grdp files should be able to catch incorrect tags |
|||||
Issue descriptionHere'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?
,
Aug 30 2017
Sending this over to an owner in grit, in case they would like to fix!
,
Aug 30 2017
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.
,
Aug 30 2017
,
Aug 31
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
,
Aug 31
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by jsaul@google.com
, Aug 25 2017Owner: ma...@chromium.org