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

8264216: [lworld] unknown.Class.default gives misleading compilation error #372

Closed
wants to merge 3 commits into from

Conversation

@jespersm
Copy link
Contributor

@jespersm jespersm commented Mar 26, 2021

Make the compilation error for somepkgname.UnknownClass.default as informative as UnknownClass.default.


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8264216: [lworld] unknown.Class.default gives misleading compilation error

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/372/head:pull/372
$ git checkout pull/372

Update a local copy of the PR:
$ git checkout pull/372
$ git pull https://git.openjdk.java.net/valhalla pull/372/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 372

View PR using the GUI difftool:
$ git pr show -t 372

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/372.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 26, 2021

👋 Welcome back jespersm! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@jespersm jespersm changed the title 8264216: unknown.Class.default gives misleading compilation error 8264216: [lworld] unknown.Class.default gives misleading compilation error Mar 26, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 26, 2021

@jespersm This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8264216: [lworld] unknown.Class.default gives misleading compilation error

Reviewed-by: sadayapalam

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the lworld branch:

  • 83d849f: 8263441: [lworld] TestUnloadedInlineTypeField fails due to unexpected compilation level
  • 226abe2: 8262831: [lworld] C2 compilation fails with assert "should be addp but is Phi"

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@sadayapalam) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@mlbridge
Copy link

@mlbridge mlbridge bot commented Mar 26, 2021

Webrevs

@jespersm
Copy link
Contributor Author

@jespersm jespersm commented Mar 26, 2021

/integrate

@openjdk openjdk bot added the sponsor label Mar 26, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 26, 2021

@jespersm
Your change (at version 4a9c011) is now ready to be sponsored by a Committer.

@sadayapalam
Copy link
Collaborator

@sadayapalam sadayapalam commented Mar 29, 2021

Thanks Jesper, I offer to be the reviewer and sponsor for this. Will study this later today and share any comments.

Copy link
Collaborator

@sadayapalam sadayapalam left a comment

Please fix the issues mentioned. Also confirm whether you have run all the tests.

@@ -38,6 +38,7 @@
import com.sun.source.tree.TreeVisitor;
import com.sun.source.util.SimpleTreeVisitor;
import com.sun.tools.javac.code.*;
import com.sun.tools.javac.code.Kinds.KindName;
Copy link
Collaborator

@sadayapalam sadayapalam Mar 31, 2021

Choose a reason for hiding this comment

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

This import looks unused ??

Copy link
Contributor Author

@jespersm jespersm Mar 31, 2021

Choose a reason for hiding this comment

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

Ooopsie, I'll fix that.

log.error(tree.pos, Errors.CantResolveLocation(Kinds.KindName.CLASS, site.tsym.getQualifiedName(), null, null,
Fragments.Location(Kinds.typeKindName(env.enclClass.type), env.enclClass.type, null)));
yield syms.errSymbol;
}
Copy link
Collaborator

@sadayapalam sadayapalam Mar 31, 2021

Choose a reason for hiding this comment

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

Looks ok, inventing a new error message altogether (such as default cannot be applied to a package) looks too heavy a hammer.

@openjdk openjdk bot removed the sponsor label Mar 31, 2021
Copy link
Collaborator

@sadayapalam sadayapalam left a comment

Changes look good. Thanks Jesper!

@sadayapalam
Copy link
Collaborator

@sadayapalam sadayapalam commented Apr 1, 2021

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Apr 1, 2021

@sadayapalam The PR has been updated since the change author (@jespersm) issued the integrate command - the author must perform this command again.

@jespersm
Copy link
Contributor Author

@jespersm jespersm commented Apr 1, 2021

/integrate

@openjdk openjdk bot added the sponsor label Apr 1, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 1, 2021

@jespersm
Your change (at version 94e65ef) is now ready to be sponsored by a Committer.

@sadayapalam
Copy link
Collaborator

@sadayapalam sadayapalam commented Apr 1, 2021

/sponsor

@openjdk openjdk bot closed this Apr 1, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 1, 2021

@sadayapalam @jespersm Since your change was applied there have been 2 commits pushed to the lworld branch:

  • 83d849f: 8263441: [lworld] TestUnloadedInlineTypeField fails due to unexpected compilation level
  • 226abe2: 8262831: [lworld] C2 compilation fails with assert "should be addp but is Phi"

Your commit was automatically rebased without conflicts.

Pushed as commit 28a4ec0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants