Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log usage of deprecated APIs #23

Open
andrewvy opened this issue Nov 14, 2017 · 1 comment
Open

Log usage of deprecated APIs #23

andrewvy opened this issue Nov 14, 2017 · 1 comment

Comments

@andrewvy
Copy link
Owner

andrewvy commented Nov 14, 2017

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.

@bcardarella
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants