Skip to content

API life cycle and deprecation policy in official documentation #4529

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

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

Olivia-liu
Copy link
Contributor

@Olivia-liu Olivia-liu commented Aug 2, 2024

Summary:

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.
The doc has some TODO items we can either address in this diff or with follow-up diffs.

For Meta reviewers: to comment easily, please review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing

Differential Revision: D60692061

Copy link

pytorch-bot bot commented Aug 2, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4529

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 69865ad with merge base f1b741e (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 2, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 2, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 2, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 2, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing

Differential Revision: D60692061
Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structure looks great; thanks for adding this.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 7, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 7, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 7, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@Olivia-liu Olivia-liu requested a review from dbort August 7, 2024 17:13
Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! Remaining comments are about consistency throughout the doc.

</td>
</tr>
<tr>
<td>Android
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "Android" and "Apple", it'd be more consistent to have rows for "Java", "Swift", "Objective C". The first column of this table is really "Language".

<tr>
<td>Android
</td>
<td>Deprecated: use <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html">java.lang.Deprecated</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency: This uses non-italicized "Deprecated" and "Experimental", but the first row italicizes them. The C++ row doesn't even mention "Deprecated" or "Experimental" directly. And the Android/Apple rows only seem to talk about deprecated code, not experimental code.

Ideally, each row of this table would be consistent with all of the other rows.

Comment on lines 129 to 174
/**
<p>
* @deprecated Use `newMethod` instead.
<p>
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to make these code blocks, though I don't know if that works in a table.

Suggested change
/**
<p>
* @deprecated Use `newMethod` instead.
<p>
*/
/**
<pre><code>
<p>
* @deprecated Use `newMethod` instead.
<p>
</code></pre>
*/

Or maybe triple-backquote will work here.

Same for the swift example

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using <code> and <p> doesn't render very well in chrome (see screenshot). Does <pre><code> work like https://stackoverflow.com/a/4611735 suggests?

screenshot of rendered table cell

</td>
<td>Deprecated: use <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html">java.lang.Deprecated</a>
<p>
Experimental: use <a href="https://developer.android.com/reference/androidx/annotation/RequiresOptIn">androidx.annotation.RequiresOptIn</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe point to https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:docs/api_guidelines/annotations.md as well (or instead), which give more guidance about using this annotation.

<p>
/**
<p>
Warning: This API is experimental
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our style guide prefers full sentences, ending with periods.

Suggested change
Warning: This API is experimental
Warning: This API is experimental.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 9, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 9, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 13, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 13, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 13, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

@Olivia-liu Olivia-liu requested a review from dbort August 14, 2024 00:49
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Aug 14, 2024
…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Differential Revision: D60692061
Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all of the changes. A couple final issues, but I'll approve now to move things along.

Comment on lines 129 to 174
/**
<p>
* @deprecated Use `newMethod` instead.
<p>
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using <code> and <p> doesn't render very well in chrome (see screenshot). Does <pre><code> work like https://stackoverflow.com/a/4611735 suggests?

screenshot of rendered table cell

<code>__attribute__((deprecated("Use newMethod instead")));</code>
<p>
<p>
<code>__attribute__((experimental("Use newMethod instead")));</code> (TODO not yet implemented)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it's possible to implement an attribute like this; they're typically defined by the toolchain.

Copy link
Contributor Author

@Olivia-liu Olivia-liu Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shoumikhin Could you comment on this please? I've chatted with Anthony offline and IIUC, there's a mapping between the Objective-C annotations and the CPP macros. So if the CPP __ET_DEPRECATED and __ET_EXPERIMENTAL can be implemented, then we can implement these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I meant we can use the deprecated annotation for experental features too, since there's no dedicated experimental annotation available. Thus __ET_EXPERIMENTAL is gonna be defined the same as deprecated, but with a different error message.

…rch#4529)

Summary:
Pull Request resolved: pytorch#4529

This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.

The doc has some TODO items we can either address in this diff or with follow-up diffs.

***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing***

Reviewed By: dbort

Differential Revision: D60692061
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60692061

@facebook-github-bot facebook-github-bot merged commit 54f8932 into pytorch:main Aug 15, 2024
36 of 37 checks passed
kirklandsign pushed a commit to kirklandsign/executorch that referenced this pull request Aug 15, 2024
Differential Revision: D60692061

Pull Request resolved: pytorch#4529
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants