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

Apidoc readme: clarify exportable methods #2140

Merged
merged 1 commit into from May 30, 2014
Merged

Apidoc readme: clarify exportable methods #2140

merged 1 commit into from May 30, 2014

Conversation

probins
Copy link
Contributor

@probins probins commented May 29, 2014

Re-add reference to the 'always exported' methods for completeness, otherwise it's not entirely correct

@@ -22,7 +22,7 @@ contain Markdown.

The second line tells the Closure compiler the type of the argument.

The third line (`@todo api`) marks the method as exportable. The stability can be added as value, e.g. `@todo api stable`. Once the documentation story is fully settled, we will remove the `todo ` and just write `@api` or `@api stable`. Without such an api note, the method will not be exported and not documented in the generated API documentation.
The third line (`@todo api`) marks the method as part of the api and thus exportable. The stability can be added as value, e.g. `@todo api stable`. Once the documentation story is fully settled, we will remove the `todo ` and just write `@api` or `@api stable`. Without such an api note, the method will not be documented in the generated API documentation; those not directly exported with `goog.exportProperty` will also not be exportable.
Copy link
Member

Choose a reason for hiding this comment

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

those not directly exported with goog.exportProperty will also not be exportable

It is not clear to me what you are trying to say here.

The truth is that where we have goog.exportProperty calls in the source, properties are unconditionally exported (independent of any @todo api annotation). The presence of a @todo api annotation in this case means that these exported properties will also be documented (this is a good thing).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are there cases where there is a goog.exportProperty but no @todo api? I was assuming not.

Copy link
Member

Choose a reason for hiding this comment

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

My point is that the two things are independent. goog.exportPropery unconditionally exports a symbol. The @todo api annotation makes a symbol "exportable" (with the build tools) and generates documentation.

Your comment that methods "not directly exported with goog.exportProperty will also not be exportable" is unclear to me. Can you explain what you are trying to say?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm trying to clarify what's currently in there. At the moment "Without such an api note, the method will not be exported" isn't correct. Those that have goog.exportProperty will be exported whether there's an api note or not (though I would assume that these 'always exported' methods should also have an api note).

Copy link
Member

Choose a reason for hiding this comment

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

How about this instead:

Without such an api annotation, the method will not be documented in the generated API documentation. Symbols without an api annotation will also not be exportable (unless they are explicitly exported with a goog.exportProperty call).

@probins
Copy link
Contributor Author

probins commented May 30, 2014

sorry, need to rebase - revised version coming up

@probins
Copy link
Contributor Author

probins commented May 30, 2014

ok, your suggestion incorporated

tschaub added a commit that referenced this pull request May 30, 2014
Apidoc readme: clarify exportable methods.
@tschaub tschaub merged commit 3573697 into openlayers:master May 30, 2014
@probins probins deleted the patch-3 branch May 31, 2014 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants