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

8268083: JDK-8267706 breaks bin/idea.sh on a Mac #4369

Closed
wants to merge 2 commits into from

Conversation

@YaaZ
Copy link
Contributor

@YaaZ YaaZ commented Jun 4, 2021

I got rid of realpath usage as discussed in #4190 and used RelativePath macro instead, however there were quite a few problems with this macro, here's the example:

$(call RelativePath,/foo/bar,/foo/bar/baz) -> "    ..//foo/bar"
$(call RelativePath,/foo/bar/baz/,/foo/bar/baz) -> SEGFAULT
$(call RelativePath,/foo/bar/baz/banan,/foo/bar/) -> "    ./baz/banan"
$(call RelativePath,/foo/bar/baz,/foo/bar/banan) -> "    ../baz"

As you can see, 1st case is just plain wrong, 2nd crashes make because of infinite loop, 3rd can be simplified and all of them have leading whitespaces
First commit in this PR fixes all these issues and adds corresponding test cases and second commit replaces usage of realpath in idea.sh with RelativePath macro in idea.gmk and fixes problems, when paths are incorrectly treated by IDEA


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4369

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

Using diff file

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

YaaZ added 2 commits Jun 4, 2021
…mon/Utils.gmk

Fixed infinite loop in FindCommonPathPrefix when given equal paths
Also fixed some incorrect cases, added ability to handle spaces and made paths comparison case insensitive on Windows
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jun 4, 2021

👋 Welcome back YaaZ! 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.

Loading

@openjdk openjdk bot added the rfr label Jun 4, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 4, 2021

@YaaZ The following labels will be automatically applied to this pull request:

  • build
  • core-libs

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

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 4, 2021

Webrevs

Loading

@erikj79
Copy link
Member

@erikj79 erikj79 commented Jun 4, 2021

Nice work, this looks great! Thank you for improving the RelativePath macro. Since this is touching some very core and sensitive build functionality, I'm going to run it through all our internal builds just to be safe.

Loading

erikj79
erikj79 approved these changes Jun 7, 2021
Copy link
Member

@erikj79 erikj79 left a comment

All builds passed, approved.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Jun 7, 2021

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

8268083: JDK-8267706 breaks bin/idea.sh on a Mac

Reviewed-by: erikj

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

  • e546ae2: 8268296: ScopedMemoryAccess build error with readonly filesystems
  • 81600dc: 8191441: (Process) add Readers and Writer access to java.lang.Process streams
  • 7e55569: 8261549: Adjust memory size in MTLTexurePool.m
  • e663ba9: 8268299: jvms tag produces incorrect URL
  • 3396b69: 8254129: IR Test Framework to support regex-based matching on the IR in JTreg compiler tests
  • 270ec97: 8268331: Fix crash in humongous object eager reclaim logging
  • ea8274f: 8267875: Shenandoah: Duplicated code in ShenandoahBarrierSetC2::ideal_node()
  • a91f971: 8268267: Remove -Djavatest.security.noSecurityManager=true from jtreg runs
  • 4f9d6b7: 8267465: remove superfluous preview related annotations and test options
  • 728a411: 8268018: remove dead code in commitLimitter
  • ... and 33 more: https://git.openjdk.java.net/jdk/compare/59a539fef12dec6ba8af8a41000829402e7e9b72...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.

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 (@erikj79) 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).

Loading

@openjdk openjdk bot added the ready label Jun 7, 2021
@YaaZ
Copy link
Contributor Author

@YaaZ YaaZ commented Jun 7, 2021

/integrate

Loading

@openjdk openjdk bot added the sponsor label Jun 7, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 7, 2021

@YaaZ
Your change (at version 02c1742) is now ready to be sponsored by a Committer.

Loading

@avu
Copy link

@avu avu commented Jun 8, 2021

/sponsor

Loading

@openjdk openjdk bot closed this Jun 8, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 8, 2021

@avu @YaaZ Since your change was applied there have been 59 commits pushed to the master branch:

  • 8158b82: 8268327: Upstream: 8268169: The system lookup can not find stdio functions such as printf on Windows 10
  • 6843576: 8268227: java/foreign/TestUpcall.java still times out
  • 2717fcb: 8232948: javac -h should mangle the overload argument signature
  • 89da202: 8266159: macOS ARM + Metal pipeline shows artifacts on Swing Menu with Java L&F
  • 61ab4b9: 8267564: JDK-8252971 causes SPECjbb2015 socket exceptions on Windows when MKS is installed
  • 00c88f7: 8266918: merge_stack in check_code.c add NULL check
  • 8105478: 8268165: AsyncLogging will crash if rotate() fails
  • fd91b2a: 8265440: IGV: make node selection more visible
  • 81bad59: 8257774: G1: Trigger collect when free region count drops below threshold to prevent evacuation failures
  • 341f676: 8267908: linux: thread_native_entry can scribble on stack frame
  • ... and 49 more: https://git.openjdk.java.net/jdk/compare/59a539fef12dec6ba8af8a41000829402e7e9b72...master

Your commit was automatically rebased without conflicts.

Pushed as commit 159cb6f.

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

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 15, 2021

Mailing list message from Maurizio Cimadamore on build-dev:

This PR removes support for the Ant support file. Without that, many of
the IDE actions are no longer working. Jtreg plugin support seems broken
as well, as you can no longer select which build target has to be
executed before the tests are run.

I think I'm a bit concerned by these changes, in the sense that they
tweak quite a lot of the functionality of the IDE project, in ways which
makes them no longer working, and, more generally, this PR does a lot
more than just replacing realpath, it seems.

I think we should back this out, and have a wider discussion (possibly
using ide-support mailing list) as to whether some of the features in
this PR are worth pursuing.

As things stand, I can no longer use the IDE in a way which works.

Maurizio

On 08/06/2021 15:39, Nikita Gubarkov wrote:

Loading

1 similar comment
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 15, 2021

Mailing list message from Maurizio Cimadamore on build-dev:

This PR removes support for the Ant support file. Without that, many of
the IDE actions are no longer working. Jtreg plugin support seems broken
as well, as you can no longer select which build target has to be
executed before the tests are run.

I think I'm a bit concerned by these changes, in the sense that they
tweak quite a lot of the functionality of the IDE project, in ways which
makes them no longer working, and, more generally, this PR does a lot
more than just replacing realpath, it seems.

I think we should back this out, and have a wider discussion (possibly
using ide-support mailing list) as to whether some of the features in
this PR are worth pursuing.

As things stand, I can no longer use the IDE in a way which works.

Maurizio

On 08/06/2021 15:39, Nikita Gubarkov wrote:

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 15, 2021

Mailing list message from Maurizio Cimadamore on build-dev:

Seems like another big change is that we try to create an IDE module per
imported JDK module.

Again, whether this is feasible or not is something which deserves more
discussion. At the moment it just doesn't work.

Maurizio

On 15/06/2021 14:26, Maurizio Cimadamore wrote:

This PR removes support for the Ant support file. Without that, many
of the IDE actions are no longer working. Jtreg plugin support seems
broken as well, as you can no longer select which build target has to
be executed before the tests are run.

I think I'm a bit concerned by these changes, in the sense that they
tweak quite a lot of the functionality of the IDE project, in ways
which makes them no longer working, and, more generally, this PR does
a lot more than just replacing realpath, it seems.

I think we should back this out, and have a wider discussion (possibly
using ide-support mailing list) as to whether some of the features in
this PR are worth pursuing.

As things stand, I can no longer use the IDE in a way which works.

Maurizio

On 08/06/2021 15:39, Nikita Gubarkov wrote:

Loading

1 similar comment
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 15, 2021

Mailing list message from Maurizio Cimadamore on build-dev:

Seems like another big change is that we try to create an IDE module per
imported JDK module.

Again, whether this is feasible or not is something which deserves more
discussion. At the moment it just doesn't work.

Maurizio

On 15/06/2021 14:26, Maurizio Cimadamore wrote:

This PR removes support for the Ant support file. Without that, many
of the IDE actions are no longer working. Jtreg plugin support seems
broken as well, as you can no longer select which build target has to
be executed before the tests are run.

I think I'm a bit concerned by these changes, in the sense that they
tweak quite a lot of the functionality of the IDE project, in ways
which makes them no longer working, and, more generally, this PR does
a lot more than just replacing realpath, it seems.

I think we should back this out, and have a wider discussion (possibly
using ide-support mailing list) as to whether some of the features in
this PR are worth pursuing.

As things stand, I can no longer use the IDE in a way which works.

Maurizio

On 08/06/2021 15:39, Nikita Gubarkov wrote:

Loading

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