Skip to content

8315452: Erroneous AST missing modifiers for partial input #15517

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

Closed
wants to merge 1 commit into from

Conversation

lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Aug 31, 2023

Consider code like:

package test;
public

Before JDK-8305671, this was producing an AST which included the package clause + an ErroneousTree, which contained the public as partial modifiers.

After JDK-8305671, the public is no longer included in the AST, and hence it is invisible for tools that operate on the AST.

My proposal is to return the public back to the AST. Seems that the problem from JDK-8305671 can be solved by breaking out of the outter loop, instead of inner loop, as it was before JDK-8305671, without affecting non-eof situations.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8315452: Erroneous AST missing modifiers for partial input (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15517/head:pull/15517
$ git checkout pull/15517

Update a local copy of the PR:
$ git checkout pull/15517
$ git pull https://git.openjdk.org/jdk.git pull/15517/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15517

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15517.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 31, 2023

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 31, 2023
@openjdk
Copy link

openjdk bot commented Aug 31, 2023

@lahodaj The following label will be automatically applied to this pull request:

  • compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the compiler compiler-dev@openjdk.org label Aug 31, 2023
@mlbridge
Copy link

mlbridge bot commented Aug 31, 2023

Webrevs

Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

Choose a reason for hiding this comment

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

looks sensible

@openjdk
Copy link

openjdk bot commented Sep 1, 2023

@lahodaj 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:

8315452: Erroneous AST missing modifiers for partial input

Reviewed-by: vromero

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 44 new commits pushed to the master branch:

  • 2f7c65e: 8303427: Fixpath confused if unix root contains "/jdk"
  • e9e0c56: 8314319: LogCompilation doesn't reset lateInlining when it encounters a failure.
  • 56b8db1: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF
  • 0d4cadb: 8315195: RISC-V: Update hwprobe query for new extensions
  • b4f7069: 8315446: G1: Remove unused G1AllocRegion::attempt_allocation
  • cf02cf3: 8315098: Improve URLEncodeDecode microbenchmark
  • c32e340: 8315321: [aix] os::attempt_reserve_memory_at must map at the requested address or fail
  • 42f5b9e: 8315436: HttpsServer does not send TLS alerts
  • 033f311: 8315069: Relativize extended_sp in interpreter frames
  • c2e01eb: 8313983: jmod create --target-platform should replace existing ModuleTarget attribute
  • ... and 34 more: https://git.openjdk.org/jdk/compare/cb3f9680d35f2afbd973c946ad4ccf94f30fffc9...master

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 1, 2023
@lahodaj
Copy link
Contributor Author

lahodaj commented Sep 4, 2023

/integrate

@lahodaj
Copy link
Contributor Author

lahodaj commented Sep 4, 2023

/backport jdk21u

@openjdk
Copy link

openjdk bot commented Sep 4, 2023

Going to push as commit 84425a6.
Since your change was applied there have been 53 commits pushed to the master branch:

  • 3094fd1: 8314662: jshell shows duplicated signatures of javap
  • 0d52c82: 8310220: IGV: dump graph after each IGVN step at level 4
  • adfc1d6: 8313323: javac -g on a java file which uses unnamed variable leads to ClassFormatError when launching that class
  • 2dc930d: 8314997: Missing optimization opportunities due to missing try_clean_mem_phi() calls
  • ab12c5d: 8315549: CITime misreports code/total nmethod sizes
  • ba8d5c2: 8315582: Exclude compiler/codecache/CodeCacheFullCountTest.java with Xcomp
  • 75d4ac2: 8311775: [TEST] duplicate verifyHeapDump in several tests
  • 4f90aba: 8311585: Add JRadioButtonMenuItem to bug8031573.java
  • 2a11bc4: 8314837: 5 compiled/codecache tests ignore VM flags
  • 2f7c65e: 8303427: Fixpath confused if unix root contains "/jdk"
  • ... and 43 more: https://git.openjdk.org/jdk/compare/cb3f9680d35f2afbd973c946ad4ccf94f30fffc9...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 4, 2023
@openjdk openjdk bot closed this Sep 4, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 4, 2023
@openjdk
Copy link

openjdk bot commented Sep 4, 2023

@lahodaj Pushed as commit 84425a6.

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

@openjdk
Copy link

openjdk bot commented Sep 4, 2023

@lahodaj Could not automatically backport 84425a62 to openjdk/jdk21u due to conflicts in the following files:

  • test/langtools/tools/javac/parser/JavacParserTest.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk21u. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk21u.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b lahodaj-backport-84425a62

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git 84425a62904f84601affc9710eefece88665374a

# Backport the commit
$ git cherry-pick --no-commit 84425a62904f84601affc9710eefece88665374a
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 84425a62904f84601affc9710eefece88665374a'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk21u with the title Backport 84425a62904f84601affc9710eefece88665374a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants