Bug 180211 - Move DateComponents into WTF
Summary: Move DateComponents into WTF
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-30 11:47 PST by Christopher Reid
Modified: 2017-12-05 16:00 PST (History)
8 users (show)

See Also:


Attachments
Patch (24.45 KB, patch)
2017-11-30 17:49 PST, Christopher Reid
no flags Details | Formatted Diff | Diff
Patch (25.26 KB, patch)
2017-11-30 18:04 PST, Christopher Reid
no flags Details | Formatted Diff | Diff
Patch for landing (82.59 KB, patch)
2017-12-01 13:13 PST, Christopher Reid
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Reid 2017-11-30 11:47:52 PST
It is currently in platform and used by platform/text for localization
Comment 1 Christopher Reid 2017-11-30 17:49:44 PST
Created attachment 328061 [details]
Patch
Comment 2 EWS Watchlist 2017-11-30 17:52:31 PST
Attachment 328061 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/DateComponents.h:88:  The parameter name "format" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:123:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:125:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:127:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:129:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:131:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:134:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:137:  The parameter name "months" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:181:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.h:182:  The parameter name "ms" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/DateComponents.cpp:187:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/html/DateTimeInputType.h:42:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 12 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Christopher Reid 2017-11-30 18:04:18 PST
Created attachment 328062 [details]
Patch
Comment 4 Myles C. Maxfield 2017-11-30 19:02:52 PST
Comment on attachment 328062 [details]
Patch

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

> Source/WTF/wtf/DateComponents.hSource/WebCore/platform/DateComponents.h:70
> +    WTF_EXPORT_PRIVATE int millisecond() const { return m_millisecond; }

Aren't these inlined? What is the EXPORT for?
Comment 5 Christopher Reid 2017-12-01 13:00:48 PST
(In reply to Myles C. Maxfield from comment #4)
> Comment on attachment 328062 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=328062&action=review
> 
> > Source/WTF/wtf/DateComponents.hSource/WebCore/platform/DateComponents.h:70
> > +    WTF_EXPORT_PRIVATE int millisecond() const { return m_millisecond; }
> 
> Aren't these inlined? What is the EXPORT for?

I thought I remembered seeing linker errors with those inlined functions, but I tried it again and it looks like I was just overzealous with what I was exporting. I'll take those out.

Thanks!
Comment 6 Christopher Reid 2017-12-01 13:13:00 PST
Created attachment 328143 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2017-12-01 16:21:01 PST
Comment on attachment 328143 [details]
Patch for landing

Clearing flags on attachment: 328143

Committed r225430: <https://trac.webkit.org/changeset/225430>
Comment 8 WebKit Commit Bot 2017-12-01 16:21:02 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2017-12-01 16:26:49 PST
<rdar://problem/35808884>
Comment 10 Matt Lewis 2017-12-05 15:51:48 PST
This caused and API failure on all Release Testers

Example failure:
https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/builds/1556
https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/builds/1556/steps/run-api-tests/logs/stdio

failure:
FAIL WTF.StringOperators

/Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp:52
Value of: wtfStringCopyCount
  Actual: 0
Expected: 2
string + string


/Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp:54
Value of: wtfStringCopyCount
  Actual: 0
Expected: 2
atomicString + string
Comment 11 Alex Christensen 2017-12-05 15:58:40 PST
(In reply to Matt Lewis from comment #10)
> This caused and API failure on all Release Testers
This is a crazy linker issue caused by WTFString.h being included in different places making the same linker symbol in different translation units with different code being generated because WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING is defined to different things.  I've fixed this before, but I don't remember how.  It's quite tricky.
Comment 12 Matt Lewis 2017-12-05 15:59:36 PST
Reverted r225430 for reason:

This caused an API failure on release.

Committed r225555: <https://trac.webkit.org/changeset/225555>
Comment 13 Alex Christensen 2017-12-05 16:00:59 PST
(In reply to Alex Christensen from comment #11)
> (In reply to Matt Lewis from comment #10)
> > This caused and API failure on all Release Testers
> This is a crazy linker issue caused by WTFString.h being included in
> different places making the same linker symbol in different translation
> units with different code being generated because
> WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING is defined to different things. 
> I've fixed this before, but I don't remember how.  It's quite tricky.

Actually, it might be a different issue.  Either way, quite tricky.