From 59c79865ef866cb76b7f772a18b58fa6e95d4e5d Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 18 Jul 2018 10:51:41 -0600 Subject: Update java version support Although the newer versions are marketed as simple versions, scons will see them as dotted versions: 9.0, 10.0. Add some comments to this in test code - the RMI test skip ought to work as long as they stay dotted versions (since 10.0 >= 1.8); that code does run the test for a simple version like '6'. Signed-off-by: Mats Wichmann --- src/CHANGES.txt | 1 + src/engine/SCons/Tool/JavaCommon.py | 4 ++-- test/Java/RMIC.py | 4 ++++ test/Repository/RMIC.py | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 703bebb..1f0036b 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -93,6 +93,7 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE This changes SCons to better comply with normal Python installation practices. From Mats Wichmann: + - Recognize new java 9, 10 (as 9.0 and 10.0) - Updated manpage scons.xml to fix a nested list problem - Updated doc terminiology: use prepend instead of append as appropriate - xml validity fixes from SConstruct.py change diff --git a/src/engine/SCons/Tool/JavaCommon.py b/src/engine/SCons/Tool/JavaCommon.py index a253db0..5f54605 100644 --- a/src/engine/SCons/Tool/JavaCommon.py +++ b/src/engine/SCons/Tool/JavaCommon.py @@ -65,7 +65,7 @@ if java_parsing: def __init__(self, version=default_java_version): if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6', '1.7', - '1.8', '5', '6', '9', '10'): + '1.8', '5', '6', '9.0', '10.0'): msg = "Java version %s not supported" % version raise NotImplementedError(msg) @@ -171,7 +171,7 @@ if java_parsing: if self.version in ('1.1', '1.2', '1.3', '1.4'): clazz = self.listClasses[0] self.listOutputs.append('%s$%d' % (clazz, self.nextAnon)) - elif self.version in ('1.5', '1.6', '1.7', '1.8', '5', '6', '9', '10'): + elif self.version in ('1.5', '1.6', '1.7', '1.8', '5', '6', '9.0', '10.0'): self.stackAnonClassBrackets.append(self.brackets) className = [] className.extend(self.listClasses) diff --git a/test/Java/RMIC.py b/test/Java/RMIC.py index b29a466..19e799e 100644 --- a/test/Java/RMIC.py +++ b/test/Java/RMIC.py @@ -108,6 +108,10 @@ if java_version.count('.') == 1: # If it's 1.8 or higher, we skip the further RMIC test # because we'll get warnings about the deprecated API... # it's just not state-of-the-art anymore. +# Recent java versions (9 and greater) are back to being +# marketed as a simple version, but java_where_javac() will +# still return a dotted version, like 10.0. If this changes, +# will need to rework this rule. # Note, how we allow simple version strings like "5" and # "6" to successfully pass this test. if curver < (1, 8): diff --git a/test/Repository/RMIC.py b/test/Repository/RMIC.py index e08c716..433890f 100644 --- a/test/Repository/RMIC.py +++ b/test/Repository/RMIC.py @@ -51,6 +51,10 @@ if java_version.count('.') == 1: # If it's 1.8 or higher, we skip the further RMIC test # because we'll get warnings about the deprecated API... # it's just not state-of-the-art anymore. +# Recent java versions (9 and greater) are back to being +# marketed as a simple version, but java_where_javac() will +# still return a dotted version, like 10.0. If this changes, +# will need to rework this rule. # Note, how we allow simple version strings like "5" and # "6" to successfully pass this test. if curver >= (1, 8): -- cgit v0.12