|
|
Descriptiongn: Add spelling suggestions for args.gn and --args.
Demo:
ERROR at build arg file (use "gn args <out_dir>" to edit):11:13: Build argument has no effect.
use_clang = true
^---
Did you mean "is_clang"?
The variable "use_clang" was set as a build argument
but never appeared in a declare_args() block in any buildfile.
To view all possible args, run "gn args --list <builddir>"
BUG=none
Committed: https://crrev.com/e591a5fb9a0015e7dcd71e566f2914233aaea35e
Cr-Commit-Position: refs/heads/master@{#436572}
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : no types #Patch Set 4 : rebase #Messages
Total messages: 24 (14 generated)
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Description was changed from ========== gn: Add spelling suggestions for args.gn and --args. Demo: BUG=none ========== to ========== gn: Add spelling suggestions for args.gn and --args. Demo: ERROR at build arg file (use "gn args <out_dir>" to edit):11:13: Build argument has no effect. use_clang = true ^--- Did you mean "is_clang"? The variable "use_clang" was set as a build argument but never appeared in a declare_args() block in any buildfile. To view all possible args, run "gn args --list <builddir>" BUG=none ==========
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
thakis@chromium.org changed reviewers: + brettw@chromium.org
Isn't it pretty?! Now that I look at it, it's a bit strange to me that it says "build arg file (use "gn args <out_dir>" to edit)" instead of just "args.gn", but that's independent of this CL.
(I'm not sure if requiring matching types is a good idea – if someone used to gyp were to say use_clang=1, gn wouldn't show a suggestion for that. But ignoring the "folks coming from gyp" argument, it probably produces better diagnostics if it only suggests replacements that'd actually typecheck.)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
I think I would prefer not to do the type checking. I know there are a couple of cases of things like tri-states (true, false, and unset) where the default value is an empty string or something which means "unset". The typechecking will miss these cases. An example is use_official_google_api_keys.
Every once in a while I think about adding a null type for these cases (there's actually a null type internally, just no way in the language to make it). If we added that, then potentially we could whitelist null and add the typechecking code.
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
now without type checking
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Another idea would be to count a mismatching type as an edit distance cost of one. On Dec 5, 2016 10:20 PM, <thakis@chromium.org> wrote: > now without type checking > > https://codereview.chromium.org/2552593002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
lgtm
The CQ bit was checked by thakis@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1481024961922920, "parent_rev": "5013e9afa977ee53f62a63e6064fe54648be9d7c", "commit_rev": "10b837a671050c924a42736a0dbc2aa93af25c52"}
Message was sent while issue was closed.
Description was changed from ========== gn: Add spelling suggestions for args.gn and --args. Demo: ERROR at build arg file (use "gn args <out_dir>" to edit):11:13: Build argument has no effect. use_clang = true ^--- Did you mean "is_clang"? The variable "use_clang" was set as a build argument but never appeared in a declare_args() block in any buildfile. To view all possible args, run "gn args --list <builddir>" BUG=none ========== to ========== gn: Add spelling suggestions for args.gn and --args. Demo: ERROR at build arg file (use "gn args <out_dir>" to edit):11:13: Build argument has no effect. use_clang = true ^--- Did you mean "is_clang"? The variable "use_clang" was set as a build argument but never appeared in a declare_args() block in any buildfile. To view all possible args, run "gn args --list <builddir>" BUG=none ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== gn: Add spelling suggestions for args.gn and --args. Demo: ERROR at build arg file (use "gn args <out_dir>" to edit):11:13: Build argument has no effect. use_clang = true ^--- Did you mean "is_clang"? The variable "use_clang" was set as a build argument but never appeared in a declare_args() block in any buildfile. To view all possible args, run "gn args --list <builddir>" BUG=none ========== to ========== gn: Add spelling suggestions for args.gn and --args. Demo: ERROR at build arg file (use "gn args <out_dir>" to edit):11:13: Build argument has no effect. use_clang = true ^--- Did you mean "is_clang"? The variable "use_clang" was set as a build argument but never appeared in a declare_args() block in any buildfile. To view all possible args, run "gn args --list <builddir>" BUG=none Committed: https://crrev.com/e591a5fb9a0015e7dcd71e566f2914233aaea35e Cr-Commit-Position: refs/heads/master@{#436572} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/e591a5fb9a0015e7dcd71e566f2914233aaea35e Cr-Commit-Position: refs/heads/master@{#436572} |