Bug 210014 - Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
Summary: Web Inspector: replace `featureGuard` and `availability` with a combined `con...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 212436 212494 212497
  Show dependency treegraph
 
Reported: 2020-04-04 19:46 PDT by Devin Rousso
Modified: 2021-06-24 03:33 PDT (History)
19 users (show)

See Also:


Attachments
[Patch] WIP (2.56 MB, patch)
2020-04-04 19:48 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.56 MB, patch)
2020-05-15 12:33 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.56 MB, patch)
2020-05-15 13:12 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.56 MB, patch)
2020-05-15 13:45 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.56 MB, patch)
2020-05-15 16:21 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.58 MB, patch)
2020-05-16 13:39 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.58 MB, patch)
2020-05-21 12:41 PDT, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
[Patch] WIP (2.58 MB, patch)
2020-05-21 16:19 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.68 MB, patch)
2020-05-21 18:26 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.68 MB, patch)
2020-05-21 18:45 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-04-04 19:46:10 PDT
A benefit of this is that the frontend wouldn't generate code for things that have a non-matching `condition` (e.g. we wouldn't have an `IndexedDB` agent in the frontend if `ENABLE(INDEXED_DATABASE)` is not set).
Comment 1 Devin Rousso 2020-04-04 19:48:46 PDT
Created attachment 395472 [details]
[Patch] WIP

Because we use macros in 'InspectorBackendCommands.js' too, we need to preprocess it.  I've managed to get it working with `make`, but it also isn't nicely formatted (lots of extra newlines).  I need to get CMake working too.
Comment 2 EWS Watchlist 2020-04-04 19:52:12 PDT
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)

This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Comment 3 Timothy Hatcher 2020-04-05 06:49:11 PDT
Comment on attachment 395472 [details]
[Patch] WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=395472&action=review

> Source/JavaScriptCore/DerivedSources.make:319


Use unifdef -B and you will not need the perl.
Comment 4 Devin Rousso 2020-05-15 12:33:22 PDT
Created attachment 399502 [details]
[Patch] WIP

The changes I've made to Source/JavaScriptCore/DerivedSources.make are working for me, but I think I still need to fix Sources/JavaScriptCore/CMakeLists.txt
Comment 5 Devin Rousso 2020-05-15 13:12:43 PDT
Created attachment 399504 [details]
[Patch] WIP

fix some miscellaneous build issues
Comment 6 Devin Rousso 2020-05-15 13:45:21 PDT
Created attachment 399507 [details]
[Patch] WIP

oops it should be `ENABLE` not `HAVE` :P
Comment 7 Devin Rousso 2020-05-15 16:21:19 PDT
Created attachment 399526 [details]
[Patch] WIP

fix tests
Comment 8 Devin Rousso 2020-05-16 13:39:07 PDT
Created attachment 399563 [details]
[Patch] WIP

attempt for CMake
Comment 9 Devin Rousso 2020-05-21 12:41:03 PDT
Created attachment 399975 [details]
[Patch] WIP
Comment 10 Devin Rousso 2020-05-21 16:19:30 PDT
Created attachment 399996 [details]
[Patch] WIP
Comment 11 Devin Rousso 2020-05-21 18:26:18 PDT
Created attachment 400008 [details]
Patch
Comment 12 Radar WebKit Bug Importer 2020-05-21 18:27:47 PDT
<rdar://problem/63521191>
Comment 13 Devin Rousso 2020-05-21 18:45:02 PDT
Created attachment 400009 [details]
Patch

rebase
Comment 14 BJ Burg 2020-05-22 15:35:14 PDT
Comment on attachment 400009 [details]
Patch

r=me
Comment 15 EWS 2020-05-27 11:09:51 PDT
Committed r262203: <https://trac.webkit.org/changeset/262203>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400009 [details].
Comment 16 Carlos Garcia Campos 2021-06-24 03:33:47 PDT
Comment on attachment 400009 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400009&action=review

> Source/WebInspectorUI/CMakeLists.txt:52
> +            InspectorBackendCommands

This caused the inspector to be copied for every incremental build, see bug #227345