chrome-remote-interface icon indicating copy to clipboard operation
chrome-remote-interface copied to clipboard

Log usage of deprecated APIs

Open andrewvy opened this issue 8 years ago • 1 comments

If usage of a deprecated API function call is detected, we should log out the deprecation message:

{
    "name": "addScriptToEvaluateOnLoad",
    "parameters": [
        {
            "name": "scriptSource",
            "type": "string"
        }
    ],
    "returns": [
        {
            "name": "identifier",
            "$ref": "ScriptIdentifier",
            "description": "Identifier of the added script."
        }
    ],
    "deprecated": true,
    "description": "Deprecated, please use addScriptToEvaluateOnNewDocument instead.",
    "experimental": true
}

Here, we can parse out the deprecated boolean attribute and log out the description.

andrewvy avatar Nov 14 '17 22:11 andrewvy

It would be great if the generated code was smart enough to conditionally log if the command had a deprecation. In other words, unnecessary bytes shouldn't be present in generated functions for commands that don't have deprecations.

bcardarella avatar Nov 14 '17 23:11 bcardarella