On Mon, Mar 10, 2014 at 10:43 PM, Adam Barth <
aba...@google.com> wrote:
> On Mon Mar 10 2014 at 1:08:37 AM, Philip Jägenstedt <
phi...@opera.com>
> wrote:
>>
>> Currently, things are only deprecated when we're almost certain that it
>> can be removed soon, i.e. when the use counters are below ~0.03%.
>> Deprecating for a release cycle is a great way to give (active) developers a
>> heads-up. We don't want to deprecate everything, because then the warnings
>> will become too many to be taken seriously.
>
>
> We might want to check the set of features that are currently deprecated to
> make sure we're serious about removing them. If we print deprecation
> messages for a popular feature and then don't remove it, we're teaching
> developers to ignore deprecation messages.
Here are the currently deprecated features:
AttributeSpecified: 7.3859%
http://www.chromestatus.com/metrics/feature/timeline/popularity/162
CSSStyleSheetInsertRuleOptionalArg: 0.0934%
http://www.chromestatus.com/metrics/feature/timeline/popularity/198
CaptureAttributeAsEnum: ~0%
http://www.chromestatus.com/metrics/feature/timeline/popularity/86
CaptureEvents: 0.3477%
http://www.chromestatus.com/metrics/feature/timeline/popularity/92
ConsoleMarkTimeline: 0.0368%
http://www.chromestatus.com/metrics/feature/timeline/popularity/102
DOMImplementationCreateCSSStyleSheet: ~0%
http://www.chromestatus.com/metrics/feature/timeline/popularity/218
DocumentClear: 0.0084%
http://www.chromestatus.com/metrics/feature/timeline/popularity/74
EventReturnValue: 24.0382%
http://www.chromestatus.com/metrics/feature/timeline/popularity/137
FileError: 0.0025%
http://www.chromestatus.com/metrics/feature/timeline/popularity/126
HTMLSourceElementMedia: 0.0006%
http://www.chromestatus.com/metrics/feature/timeline/popularity/249
KeyboardEventKeyLocation: 0.5386%
http://www.chromestatus.com/metrics/feature/timeline/popularity/91
MediaErrorEncrypted: 0.0002%
http://www.chromestatus.com/metrics/feature/timeline/popularity/253
PrefixedGetImageDataHD: n/a
http://www.chromestatus.com/metrics/feature/timeline/popularity/265
PrefixedMediaSourceOpen: ~0%
http://www.chromestatus.com/metrics/feature/timeline/popularity/242
PrefixedPerformanceTimeline: 0.0005%
http://www.chromestatus.com/metrics/feature/timeline/popularity/66
PrefixedPutImageDataHD: n/a
http://www.chromestatus.com/metrics/feature/timeline/popularity/266
PrefixedSpeechAttribute: 0.5121%
http://www.chromestatus.com/metrics/feature/timeline/popularity/48
PrefixedStorageInfo: 0.1693%
http://www.chromestatus.com/metrics/feature/timeline/popularity/57
ReleaseEvents: 0.0130%
http://www.chromestatus.com/metrics/feature/timeline/popularity/93
SVGElementGetPresentationAttribute: n/a
http://www.chromestatus.com/metrics/feature/timeline/popularity/226
ShadowRootApplyAuthorStyles: ~0%
http://www.chromestatus.com/metrics/feature/timeline/popularity/269
ShowModalDialog: 0.0089%
http://www.chromestatus.com/metrics/feature/timeline/popularity/195
So much for "things are only deprecated when we're almost certain that
it can be removed soon"...
Complaining about Event.returnValue (24%) and Attr.specified (7%) is
not a good idea even if they're non-standard. Review to undeprecate:
https://codereview.chromium.org/194173002
Spec bugs filed to figure out the future of these:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25001
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25002
Document.clear/captureEvents/releaseEvents are actually specified, so
here's a review to sort that out:
https://codereview.chromium.org/193443004
The rest are below 1%, but many are still too high to be removed
soon... KeyboardEventKeyLocation looks like something that needs to be
specified.
>> However, I think that we could get more out of the deprecation step if we
>> had a slightly higher threshold for deprecation. In
>> <
http://www.chromestatus.com/metrics/feature/popularity>, there are plenty
>> of bad features we would like to remove that are above 0.03% but below 1%.
>> Deprecating some of those could, in the best of worlds, help drive usage
>> down over time to the point where they can be removed.
>>
>> What do people think of this approach, raising the limit for deprecation
>> to something like 1%, but of course still using the existing Intent to
>> Deprecate process and applying good judgement?
>
>
> IMHO, we should only deprecate features that we have a realistic chance of
> actually removing. Maybe we should try one of these 1% features as an
> example? My fear is that we won't be able to remove features with usage
> that high and we'll be spamming deprecation messages.
Your fear turns out to be reality.
I suppose there are two ways of using at these deprecation messages:
1. A friendly warning to developers that their code will break soon if
they do not act.
2. A complaint to the developer that their code is contributing to
browser engine lock-in.
I think (1) is the currently intended usage, and then it doesn't make
sense to deprecate things with 1% usage.
I'm asking if we can't do a little bit of (2) as well, but not so much
that people ignore the messages. I think a good example is
webkitRequestAnimationFrame, currently at ~0.3%. When people fail to
use the requestAnimationFrame variant when available, that's bad for
the Web platform even if it doesn't hurt us. Any reduction would be a
win, even if it doesn't fall below 0.03% any time soon.
1% is just a random number, the point is that for (2) the number
doesn't need to be the same as for (1).
Philip