WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
173769
Remove excessive headers from WebCore/{editing,fileapi,history,html,loader,page}
https://bugs.webkit.org/show_bug.cgi?id=173769
Summary
Remove excessive headers from WebCore/{editing,fileapi,history,html,loader,page}
Konstantin Tokarev
Reported
2017-06-23 07:26:54 PDT
Remove excessive headers from WebCore/{editing,fileapi,history,html,loader,page}
Attachments
Patch
(32.03 KB, patch)
2017-06-23 07:29 PDT
,
Konstantin Tokarev
no flags
Details
Formatted Diff
Diff
Patch
(30.43 KB, patch)
2017-06-23 07:58 PDT
,
Konstantin Tokarev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Konstantin Tokarev
Comment 1
2017-06-23 07:29:06 PDT
Created
attachment 313717
[details]
Patch
Konstantin Tokarev
Comment 2
2017-06-23 07:58:36 PDT
Created
attachment 313718
[details]
Patch
Simon Fraser (smfr)
Comment 3
2017-06-23 08:59:59 PDT
Comment on
attachment 313718
[details]
Patch Very nice. Did you have some automated way to find these?
Konstantin Tokarev
Comment 4
2017-06-23 09:07:11 PDT
Yes, see
https://github.com/annulen/remove-unused-headers
There remove-unused-headers-ctags.pl is the main script, it uses ctags database generated with run_ctags.sh (note that Universal Ctags is required, Exuberant Ctags doesn't understand all C++11 we use) I did no comparison with
https://include-what-you-use.org/
, I was just interested if "dumb" approach can be good enough. Though I'm pretty sure that my script runs faster :)
Konstantin Tokarev
Comment 5
2017-06-23 09:11:27 PDT
Comment on
attachment 313718
[details]
Patch Clearing flags on attachment: 313718 Committed
r218748
: <
http://trac.webkit.org/changeset/218748
>
Konstantin Tokarev
Comment 6
2017-06-23 09:11:32 PDT
All reviewed patches have been landed. Closing bug.
Michael Catanzaro
Comment 7
2017-06-23 15:30:34 PDT
Maybe one version of that script would be suitable for inclusion under Tools/Scripts?
Konstantin Tokarev
Comment 8
2017-07-14 11:25:40 PDT
(In reply to Michael Catanzaro from
comment #7
)
> Maybe one version of that script would be suitable for inclusion under > Tools/Scripts?
I've tried to use my script to remove includes from .cpp files (
r218890
) and some out-of-tree code, and found that it still does too many errors, i.e. removes headers that should be kept. Until it's fixed, script probably won't be useful for others because of extra work needed to fix up results. I still haven't got time to fix it
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