-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Making sure all API elements have @since tag #86
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
Conversation
| * Location is never set to {@code null} and initialized before it is read. | ||
| * | ||
| * @since 0.8 or earlier | ||
| * @since 0.8 or earlier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate?
|
Looks good except for one minor duplication (you can fix this in the next run) I'd have preferred to do the final change (including 0.9, 0.10, 0.11, 0.12) in one PR to minimize the disruption of other PRs (one time disruption). But I trust you had technical reasons to do it this way. Should not block this PR. |
|
I still think spreading |
|
I am trying to find out the duplications via grep, or other tool right now. |
|
Output of truffle$ grep -r @since -C 1 * | uniq -Dis now empty. Thus I believe the duplications are gone. |
|
Yes, it is true that JDK isn't placing |
|
Accepted. I'll make sure all checks pass; squash the commits and merge. |
…as the oldest version. Assigning newer versions to well known APIs introduced later.
Making sure all API elements have @SInCE tag
…E.COM/truffle:feature/inst-test-lang to master * commit '68779d26372a537482dff18231237162b002cc13': InstrumentationTestLanguage; use LanguageError as the cause for IOException. InstrumentationTestLanguage: make a bit more friendly for tool development use by giving a "name" that is easier to type InstrumentationTestLanguage: make a bit more friendly for tool development use by throwing IOException instead of RuntimeException for syntax errors.
Add PR template for backports
As an initial response to #42 I am trying to get under control what is and isn't in the Truffle API. The rule is simple: "Every element in the API needs to have Javadoc with @SInCE tag". The rule builds on following observations:
@since X.Yis simple@sincetag - just like JDK doesWe already have sigtest, but its biggest strength is in its binary compatibility check. It cannot verify presence of Javadoc and while it can be set to do exact API check, it has the drawback of keeping its info separate file(s) and not providing any of its information to developers reading Javadoc. As such I propose to use slight modification of our doclet to check that everything that is in the API is intended to be there.
This pull request is result of running the tool (via
mx javadoc --unified) and doing additional manual changes (related mostly to default constructors). It assigns@since 0.8 or earlierto all elements. The consensus was that it doesn't make sense to go deeper into the history of the API than 0.8. After a quick poll the people around me have chosen the text0.8 or earlieras the best amongpre-0.8,<0.8,0.1-0.8,(0.1,0.8]alternatives. Mostly because the part of the text before first space really represents a version.I would prefer to merge the change as soon as possible, as the amount of changes is likely to contribute to higher probability of merge conflicts. In any case I plan to work on improvements - use
0.9,0.10,0.11and0.12for elements introduced after 0.8 version.Btw. The request to document every API element needlessly increases verbosity of the source code in once case: on default constructors. True, I had to add few of them manually. On the other hand I also discovered ~five errors where default constructors were left in the API and clearly that wasn't the intention. By requiring
@sincetag being present we'll warn every Truffle API developers of this kind of errors - if that can make the Truffle API better at least in one case (and I am sure of that), I don't mind how much verbose our source code gets.Please, review my diff and help me find places where my automatic tool made mistakes.