-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8250768: javac should be adapted to changes in JEP 12 #703
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
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
The page and comments are generally good, but there is a bug that needs
to be fixed.
After clicking on the PREVIEW link in the top bar to go to the Preview
page, the word DEPRECATED is highlighted in the top navbar instead of
PREVIEW.
…-- Jon
On 11/5/20 10:13 AM, mlbridge[bot] wrote:
/Mailing list message from Alex Buckley
***@***.***> on kulla-dev
***@***.***>:/
On 11/5/2020 4:45 AM, Jan Lahoda wrote:
FWIW, a javadoc generated with the current version of the patch:
http://cr.openjdk.java.net/~jlahoda/8250768/jdk.javadoc.01/api/index.html
Allow me to draw people's attention to the PREVIEW link in the banner of
the generated javadoc. It shows all the preview APIs in the release on
one page. This is very helpful for understanding the surface area of a
preview feature.
For example, with Sealed Classes being the only preview feature likely
to target JDK 16, the PREVIEW page shows that the feature's API is
solely about reflection. It's clear that Sealed Classes do not
introduce, say, a java.lang.Sealed class analogous to the
java.lang.Record class introduced by Records in JDK 14/15 (and which
would have appeared on the PREVIEW page had it existed then).
Alex
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/703*issuecomment-722549484__;Iw!!GqivPVa7Brio!ONrE9EESNKSCZJPGXBa8TTa4Ey9OqEVTynHLfgVOrBRIkb1Cr2iqLALb01M_DlGDeQEPpw$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOUXBRRTA7I6T2AUM3QT7QTSOLTLXANCNFSM4STPEYJQ__;!!GqivPVa7Brio!ONrE9EESNKSCZJPGXBa8TTa4Ey9OqEVTynHLfgVOrBRIkb1Cr2iqLALb01M_DlE4QxPnyw$>.
|
Thanks for noticing Chris and @jonathan-gibbons. Fixed in 61264fe, updated javadoc: |
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.
I have a mild queasiness about this new overloaded use of the word "Summary", since "summary tables" are normally the summary of the contents of a declaration, like fields and methods of a class.
That being said, the usage is primarily internal, and I have no overwhelmingly wonderful alternative, and (overloading aside) the term is accurate.
So, OK for now. We can change it later if we want to.
I like how you managed to merge both the builder and writer for the new summary classes.
@@ -2942,4 +2944,256 @@ public String toString() { | |||
return first + ":" + second; | |||
} | |||
} | |||
|
|||
/** | |||
* Return the set of preview language features used to declare the given element. |
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.
"Returns"
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.
Build changes still good.
@lahodaj this pull request can not be integrated into git checkout JDK-8250768
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@lahodaj This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
I've merged the PR with the recent mainline, and I'd like to integrate sometime soon. Please let me know if there's any issue with that. Thanks! |
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.
I've looked at all the files that were marked as changed since I last looked at them.
There's one suggested enhancement to reduce string bashing between Utils
and ClassWriterImpl
that could be done now or later.
There's a pending conflict with a PR of mine to change to use a new type HtmlId
for HTML ids. This JEP12 work has been in progress for a while, and so it would be good to get it in before the HtmlId
work, and I'll deal with the merge conflict in due course.
@@ -188,15 +192,34 @@ protected TypeElement getCurrentPageElement() { | |||
|
|||
@Override @SuppressWarnings("preview") | |||
public void addClassSignature(String modifiers, Content classInfoTree) { |
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.
It seems less than ideal for this method to take a String
and to then have to take it apart and reassemble it. It looks like it should be possible (and conceptually better) to change the signature to List<String>
and to make the corresponding change to utils.modifiersToString
, probably renaming it as utils.modifiersToStrings
or something like that, and dropping the always-true
argument for trailingSpace
.
But, the code is OK as is, and the suggestion is just for an enhancement, so is OK to defer it, if you would prefer.
@@ -0,0 +1,303 @@ | |||
/* | |||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. |
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.
(minor) now 2021
*/ | ||
public abstract class SummaryListWriter<L extends SummaryAPIListBuilder> extends SubWriterHolderWriter { | ||
|
||
private String getAnchorName(SummaryElementKind kind) { |
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.
Heads-up: at some point this will conflict with another change in progress/review, to introduce a new type HtmlId
to use instead of String
for ids.
* @param headerKey table header key for the summary table | ||
* @param contentTree the content tree to which the summary table will be added | ||
*/ | ||
protected void addSummaryAPI(SortedSet<Element> apiList, String id, |
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.
Heads-up, here's another occurrence of where there will be a conflict for ids.
@@ -151,8 +151,6 @@ doclet.AnnotationInterfaces=Annotation Interfaces | |||
doclet.Exceptions=Exceptions | |||
doclet.Errors=Errors | |||
doclet.Classes=Classes | |||
doclet.packages=packages |
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.
I guess I'm mildly surprised to see all these items being removed...
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.
These were used from DeprecatedListWriter.getSummaryKey which is removed by this patch (and is unused in the current mainline, as far as I know).
@@ -0,0 +1,225 @@ | |||
/* | |||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. |
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.
Year
@@ -0,0 +1,123 @@ | |||
/* | |||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. |
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.
- I assume you will do a bulk update for affected files.
+1
…-- Jon
On 1/7/21 12:19 PM, Jan Lahoda wrote:
I've merged the PR with the recent mainline, and I'd like to integrate
sometime soon. Please let me know if there's any issue with that. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/703*issuecomment-756360085__;Iw!!GqivPVa7Brio!Oxxf6GpefmtstD2fCT8IKF4r-blOVCGWCibSjA4m4l24mI8j6j-RDEJAiBRtFfHCMqNb7Q$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOUXBRTWQAZF7NEGTD3FSGDSYYJOPANCNFSM4STPEYJQ__;!!GqivPVa7Brio!Oxxf6GpefmtstD2fCT8IKF4r-blOVCGWCibSjA4m4l24mI8j6j-RDEJAiBRtFfFTnE3pGg$>.
|
/integrate |
@lahodaj Since your change was applied there have been 22 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 2354882. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This is an update to javac and javadoc, to introduce support for Preview APIs, and generally improve javac and javadoc behavior to more closely adhere to JEP 12.
The notable changes are:
Please also see the CSR [6] for more information.
[1] http://cr.openjdk.java.net/~jlahoda/8250768/JEP12-errors-warnings-v6.html
[2] http://cr.openjdk.java.net/~jlahoda/8250768/jdk.javadoc.00/api/java.base/java/lang/Record.html
[3] http://cr.openjdk.java.net/~jlahoda/8250768/jdk.javadoc.00/api/java.compiler/javax/lang/model/element/RecordComponentElement.html
[4] http://cr.openjdk.java.net/~jlahoda/8250768/jdk.javadoc.00/api/preview-list.html
[5] http://cr.openjdk.java.net/~jlahoda/8250768/test.javadoc.00/
[6] https://bugs.openjdk.java.net/browse/JDK-8250769
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/703/head:pull/703
$ git checkout pull/703