WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
196173
Need a way to include WebKitAdditions code in WebKit API headers
https://bugs.webkit.org/show_bug.cgi?id=196173
Summary
Need a way to include WebKitAdditions code in WebKit API headers
Wenson Hsieh
Reported
2019-03-22 23:54:52 PDT
SSIA
Attachments
There has got to be a better way :(
(3.08 KB, patch)
2019-03-23 00:01 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Patch
(6.90 KB, patch)
2019-03-23 16:25 PDT
,
Wenson Hsieh
thorton
: review+
Details
Formatted Diff
Diff
Patch for landing
(7.07 KB, patch)
2019-03-27 15:50 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2019-03-23 00:01:46 PDT
Created
attachment 365804
[details]
There has got to be a better way :(
Wenson Hsieh
Comment 2
2019-03-23 00:03:48 PDT
Work towards: <
rdar://problem/47228232
>
Wenson Hsieh
Comment 3
2019-03-23 16:25:26 PDT
Created
attachment 365820
[details]
Patch
Wenson Hsieh
Comment 4
2019-03-23 16:38:25 PDT
This approach, while hacky, should at least fulfill these requirements: - When building with a non-internal SDK, we don't produce framework headers with invalid content (e.g. #if USE(APPLE_INTERNAL_SDK)). - When building with an internal SDK, we produce framework headers that contain the internal bits from WebKitAdditions. - When building with an internal SDK, the symbols defined in the WebKitAdditions pieces can be referenced in implementation files.
Tim Horton
Comment 5
2019-03-27 11:21:40 PDT
Comment on
attachment 365820
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=365820&action=review
This is 😡 but OK. For now.
> Source/WebKit/mac/replace-webkit-additions-includes.py:35 > + file_in_build_directory = open("%s/%s" % (built_products_directory, additions_path), "r")
os.path.join (in a bunch of places)
> Source/WebKit/mac/replace-webkit-additions-includes.py:75 > + print "(%s): failed to write to file: %s" % (argv[0], header_path)
print as a function? what happens with python3? do we care? I don't know?
Wenson Hsieh
Comment 6
2019-03-27 14:20:47 PDT
Comment on
attachment 365820
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=365820&action=review
>> Source/WebKit/mac/replace-webkit-additions-includes.py:35 >> + file_in_build_directory = open("%s/%s" % (built_products_directory, additions_path), "r") > > os.path.join (in a bunch of places)
👍🏻
> Source/WebKit/mac/replace-webkit-additions-includes.py:50 > + header_path = argv[1] > + built_products_directory = argv[2] > + sdk_root_directory = argv[3]
I also added sanity checks here to return early and print usage if the wrong number of arguments is supplied.
>> Source/WebKit/mac/replace-webkit-additions-includes.py:75 >> + print "(%s): failed to write to file: %s" % (argv[0], header_path) > > print as a function? what happens with python3? do we care? I don't know?
Good catch, we should be compatible with python3! I ran this with `/usr/bin/env python3` for good measure, and verified that everything behaves as expected.
Wenson Hsieh
Comment 7
2019-03-27 15:50:32 PDT
Created
attachment 366117
[details]
Patch for landing
WebKit Commit Bot
Comment 8
2019-03-27 16:34:15 PDT
Comment on
attachment 366117
[details]
Patch for landing Clearing flags on attachment: 366117 Committed
r243569
: <
https://trac.webkit.org/changeset/243569
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug