RFR: 8268083: JDK-8267706 breaks bin/idea.sh on a Mac
Erik Joelsson
erikj at openjdk.java.net
Mon Jun 7 17:50:21 UTC 2021
On Fri, 4 Jun 2021 21:23:27 GMT, Nikita Gubarkov <github.com+9004656+YaaZ at openjdk.org> wrote:
> I got rid of `realpath` usage as discussed in https://github.com/openjdk/jdk/pull/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
All builds passed, approved.
-------------
Marked as reviewed by erikj (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4369
More information about the build-dev
mailing list