On Mon, 7 Nov 2022 12:15:35 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> make/CompileInterimLangtools.gmk line 78: >> >>> 76: $(call LogInfo, Generating Preview.java for >>> jdk.compiler.interim) >>> 77: $(call MakeDir, $(@D)) >>> 78: $(GREP) -v 'case PATTERN_SWITCH ->' $< > $@ >> >> I understand that you have based this on the example above. There is a huge >> difference, though. The sed expression just updates the package name to >> include the new `interim` part. These new additions seems to be designed to >> filter out actual code. >> >> Since no reason for this is given in comments, I'm assuming there is some >> code that either does not compile when building this for the interim JDK, or >> that gives the incorrect result if included. But that means that now >> suddenly the makefiles has intricate knowledge about specific lines of code >> in the source code! That is not a good entanglement to have. > > To be more specific: is there some way the code in Preview.java and > TransPatterns.java can be modified so this transmogrification is not needed? Patched interim Preview and TransPatterns is a temporary workaround to allow internal use of pattern switch in the JDK sources. ------------- PR: https://git.openjdk.org/jdk/pull/10982