WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
189047
Add nullablity attributes to JSValue
https://bugs.webkit.org/show_bug.cgi?id=189047
Summary
Add nullablity attributes to JSValue
Keith Miller
Reported
2018-08-28 07:42:16 PDT
Add nullablity attributes to JSValue
Attachments
Patch
(16.44 KB, patch)
2018-08-28 07:42 PDT
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch for landing
(16.44 KB, patch)
2018-08-28 10:28 PDT
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch for landing
(15.72 KB, patch)
2018-08-28 10:34 PDT
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch
(12.41 KB, patch)
2018-08-28 12:00 PDT
,
Keith Miller
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Keith Miller
Comment 1
2018-08-28 07:42:45 PDT
Created
attachment 348291
[details]
Patch
Geoffrey Garen
Comment 2
2018-08-28 09:58:04 PDT
Comment on
attachment 348291
[details]
Patch r=me
Keith Miller
Comment 3
2018-08-28 10:28:54 PDT
Created
attachment 348306
[details]
Patch for landing
Keith Miller
Comment 4
2018-08-28 10:32:35 PDT
Comment on
attachment 348306
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=348306&action=review
> Source/JavaScriptCore/API/JSValue.h:363 > +- (void)defineProperty:(nullable JSValueProperty)property descriptor:(nullable id)descriptor;
Actually, I think this needs to be nullable only when it can be an id and non-null the rest of the time. Will fix.
Keith Miller
Comment 5
2018-08-28 10:34:04 PDT
Created
attachment 348308
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2018-08-28 11:11:30 PDT
Comment on
attachment 348308
[details]
Patch for landing Clearing flags on attachment: 348308 Committed
r235432
: <
https://trac.webkit.org/changeset/235432
>
WebKit Commit Bot
Comment 7
2018-08-28 11:11:32 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2018-08-28 11:12:30 PDT
<
rdar://problem/43805577
>
mitz
Comment 9
2018-08-28 11:15:41 PDT
Normally we’d enclose an API header in NS_ASSUME_NONNULL_BEGIN-NS_ASSUME_NONNULL_END and only annotate the nullable types.
Keith Miller
Comment 10
2018-08-28 11:52:09 PDT
(In reply to mitz from
comment #9
)
> Normally we’d enclose an API header in > NS_ASSUME_NONNULL_BEGIN-NS_ASSUME_NONNULL_END and only annotate the nullable > types.
Oh, I didn't know that existed. I'll upload a new version.
Keith Miller
Comment 11
2018-08-28 12:00:16 PDT
Reopening to attach new patch.
Keith Miller
Comment 12
2018-08-28 12:00:17 PDT
Created
attachment 348317
[details]
Patch
Keith Miller
Comment 13
2018-08-28 13:00:46 PDT
Committed
r235436
: <
https://trac.webkit.org/changeset/235436
>
Darin Adler
Comment 14
2018-08-28 19:53:31 PDT
Will this break compatibility for Swift programs that use these methods?
Darin Adler
Comment 15
2018-08-28 19:53:57 PDT
Will this break source code compatibility for Swift programs that use these methods?
Keith Miller
Comment 16
2018-08-28 21:40:42 PDT
(In reply to Darin Adler from
comment #15
)
> Will this break source code compatibility for Swift programs that use these > methods?
No, it will just generate a warning if the users don't follow the nullability rules. At least according to
https://developer.apple.com/swift/blog/?id=25
.
Darin Adler
Comment 17
2018-08-28 21:42:46 PDT
(In reply to Keith Miller from
comment #16
)
> (In reply to Darin Adler from
comment #15
) > > Will this break source code compatibility for Swift programs that use these > > methods? > > No, it will just generate a warning if the users don't follow the > nullability rules. At least according to >
https://developer.apple.com/swift/blog/?id=25
.
I read that, and it’s not what it says. In Objective-C code it just creates warnings. In Swift code, the change is different. I think it *is* a source-incompatible Swift change. But maybe one that is worth doing.
Keith Miller
Comment 18
2018-08-28 22:28:01 PDT
(In reply to Darin Adler from
comment #17
)
> (In reply to Keith Miller from
comment #16
) > > (In reply to Darin Adler from
comment #15
) > > > Will this break source code compatibility for Swift programs that use these > > > methods? > > > > No, it will just generate a warning if the users don't follow the > > nullability rules. At least according to > >
https://developer.apple.com/swift/blog/?id=25
. > > I read that, and it’s not what it says. In Objective-C code it just creates > warnings. In Swift code, the change is different. I think it *is* a > source-incompatible Swift change. But maybe one that is worth doing.
Ah, I misread your comment. Yeah, I think it's a source-incompatible Swift change. It seems like it's an incompatible change that we are encouraged to make.
Keith Miller
Comment 19
2018-08-29 10:09:08 PDT
(In reply to Keith Miller from
comment #18
)
> (In reply to Darin Adler from
comment #17
) > > (In reply to Keith Miller from
comment #16
) > > > (In reply to Darin Adler from
comment #15
) > > > > Will this break source code compatibility for Swift programs that use these > > > > methods? > > > > > > No, it will just generate a warning if the users don't follow the > > > nullability rules. At least according to > > >
https://developer.apple.com/swift/blog/?id=25
. > > > > I read that, and it’s not what it says. In Objective-C code it just creates > > warnings. In Swift code, the change is different. I think it *is* a > > source-incompatible Swift change. But maybe one that is worth doing. > > Ah, I misread your comment. Yeah, I think it's a source-incompatible Swift > change. It seems like it's an incompatible change that we are encouraged to > make.
Investigating further it looks like we are trying to avoid source-incompatible changes. I'm gonna revert this for now.
WebKit Commit Bot
Comment 20
2018-08-29 10:10:29 PDT
Re-opened since this is blocked by
bug 189085
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