Bug 210014

Summary: Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, bburg, cgarcia, ews-watchlist, glenn, gyuyoung.kim, hi, inspector-bugzilla-changes, jbedard, joepeck, keith_miller, mark.lam, msaboff, ryuan.choi, saam, sergio, timothy, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=227345
Bug Depends on:    
Bug Blocks: 212436, 212494, 212497    
Attachments:
Description Flags
[Patch] WIP
hi: commit-queue-
[Patch] WIP
hi: commit-queue-
[Patch] WIP
hi: commit-queue-
[Patch] WIP
hi: commit-queue-
[Patch] WIP
hi: commit-queue-
[Patch] WIP
hi: commit-queue-
[Patch] WIP
hi: commit-queue-
[Patch] WIP
none
Patch
none
Patch none

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