[meta] Replace union OptionalType usages with Maybe<Type> in ipdls
Categories
(Core :: IPC, task, P3)
Tracking
()
People
(Reporter: kanru, Unassigned)
References
Details
(Keywords: meta)
Updated•8 years ago
|
Updated•3 years ago
|
Comment 1•6 months ago
|
||
I cannot find OptionalType in any ipdl these days? Am I overlooking something?
Updated•6 months ago
|
Comment 2•6 months ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #1)
I cannot find
OptionalTypein any ipdl these days? Am I overlooking something?
OptionalType is just an example. The idea here is that people were making their own Maybe-style types with IPDL unions, and the proposal was to use Maybe instead. Nowadays, we have the nicer syntax ? for these kinds of optional types. I see a bunch of places where people have done the conversion in the intervening decade, and if we see further places where this is happening we'd want to replace it, but this is a meta bug with only one blocking bug, so let's just close it.
Comment 3•6 months ago
|
||
That being said, if somebody does want to look for these, looking for union maybe or union opt does turn up a handful of these.
Comment 4•6 months ago
|
||
It would also be possible to hack up the IPDL compiler to yell if somebody created a union where one option is null_t or void_t to dredge up more, although there are likely false positives there. You could restrict it to places where there are only two cases, but then you'd miss things like MaybeInputData where A || B || void_t could perhaps be changed to InputData? defined as A || B.
Description
•