From derby-dev-return-119160-archive-asf-public=cust-asf.ponee.io@db.apache.org Sun Sep 2 00:16:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 19061180630 for ; Sun, 2 Sep 2018 00:16:03 +0200 (CEST) Received: (qmail 61592 invoked by uid 500); 1 Sep 2018 22:16:03 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 61582 invoked by uid 99); 1 Sep 2018 22:16:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Sep 2018 22:16:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C88841A0261 for ; Sat, 1 Sep 2018 22:16:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4PnK_yRlqnnY for ; Sat, 1 Sep 2018 22:16:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D8FAE5F1E3 for ; Sat, 1 Sep 2018 22:16:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5677CE0F39 for ; Sat, 1 Sep 2018 22:16:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1878926B57 for ; Sat, 1 Sep 2018 22:16:00 +0000 (UTC) Date: Sat, 1 Sep 2018 22:16:00 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DERBY-6945) Re-package Derby as a collection of jigsaw modules MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6945?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1659= 9815#comment-16599815 ]=20 Rick Hillegas edited comment on DERBY-6945 at 9/1/18 10:15 PM: --------------------------------------------------------------- Attaching derby-6945-49-aa-runSomeTestsWithModulePath.diff. This patch make= s it possible to run many tests using the module path. Sample tests I tried= included sql and java tests which are run under the old harness and JUnit = tests. With this patch, the regression tests ran cleanly when executed the = old-fashioned (classpath-based) way. This patch makes the following changes: 1) The engine module exports more internal api packages for use by query pl= ans which are code-generated into the unnamed module. These packages popped= up as I ran more tests with the module path. 2) The shared module exports org.apache.derby.shared.common.error for use b= y query plans. 3) The server module needs to expose another package to the engine module. = One of the sample tests disclosed this need. 4) Formatting nit. 5) The test harnesses now build module-aware JVM boot commands when they th= emselves are started with a module path. In order to run tests with a module path, first point the MODULE_PATH varia= ble at all the jars in the jars/sane directory and in tools/java. That is, = set MODULE_PATH to a colon-separated list of all those jars. Then, to run old-harness tests with a module path, issue the following comm= and, where $SINGLE_TEST is a test name like lang/aggregateOptimization.sql: {noformat} java -p $MODULEPATH \ --add-modules org.apache.derby.tests,junit \ -m org.apache.derby.tests/org.apache.derbyTesting.functionTests.harness.R= unTest \ $SINGLE_TEST {noformat} To run a JUnit test with the module path, issue the following command, wher= e $SINGLE_TEST is a test name like org.apache.derbyTesting.functionTests.te= sts.lang.AggBuiltinTest: {noformat} java -p $MODULEPATH \ --add-modules org.apache.derby.tests \ -m junit/junit.textui.TestRunner \ $SINGLE_TEST {noformat} In later patches, I will work toward the goal of running all tests cleanly = both the old way (with classpaths) and the new way (with module paths). Touches the following files: {noformat} -------------------------------- M java/org.apache.derby.engine/module-info.java (1) Expose more packages for use by query plans which are code-generated into the unnamed module. -------------------------------- M java/org.apache.derby.commons/module-info.java (2) Expose more packages for use by query plans which are code-generated into the unnamed module. -------------------------------- M java/org.apache.derby.server/module-info.java 3) Export another package to the engine module. -------------------------------- M java/org.apache.derby.tools/org/apache/derby/impl/tools/sysinfo/Mai= n.java 4) Formatting nit. -------------------------------- M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/h= arness/FileCompare.java M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/h= arness/RunTest.java M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/h= arness/jvm.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/BaseTestC= ase.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/DerbyCons= tants.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/NetworkSe= rverTestSetup.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/SecurityM= anagerSetup.java 5) Start child processes with a module path when the harnesses themselves a= re booted with a module path. {noformat} was (Author: rhillegas): Attaching derby-6945-49-aa-runSomeTestsWithModulePath.diff. This patch make= s it possible to run many tests using the module path. Sample tests I tried= included sql and java tests which are run under the old harness and JUnit = tests. With this patch, the regression tests ran cleanly when executed the = old-fashioned (classpath-based) way. This patch makes the following changes: 1) The engine module exports more internal api packages for use by query pl= ans which are code-generated into the unnamed module. These packages popped= up as I ran more tests with the module path. 2) The shared module exports org.apache.derby.shared.common.error for use b= y query plans. 3) The server module needs to expose another package to the engine module. = One of the sample tests disclosed this need. 4) Formatting nit. 5) The test harnesses now build module-aware JVM boot commands when they th= emselves are started with a module path. In order to run tests with a module path, first point the MODULE_PATH varia= ble at all the jars in the jars/sane directory and in tools/java. That is, = set MODULE_PATH to a colon-separated list of all those jars. Then, to run old-harness tests with a module path, issue the following comm= and, where $SINGLE_TEST is a test name like lang/aggregateOptimization.sql: {format} java -p $MODULEPATH \ --add-modules org.apache.derby.tests,junit \ -m org.apache.derby.tests/org.apache.derbyTesting.functionTests.harness.R= unTest \ $SINGLE_TEST {format} To run a JUnit test with the module path, issue the following command, wher= e $SINGLE_TEST is a test name like org.apache.derbyTesting.functionTests.te= sts.lang.AggBuiltinTest: {noformat} java -p $MODULEPATH \ --add-modules org.apache.derby.tests \ -m junit/junit.textui.TestRunner \ $SINGLE_TEST {noformat} In later patches, I will work toward the goal of running all tests cleanly = both the old way (with classpaths) and the new way (with module paths). Touches the following files: {noformat} -------------------------------- M java/org.apache.derby.engine/module-info.java (1) Expose more packages for use by query plans which are code-generated into the unnamed module. -------------------------------- M java/org.apache.derby.commons/module-info.java (2) Expose more packages for use by query plans which are code-generated into the unnamed module. -------------------------------- M java/org.apache.derby.server/module-info.java 3) Export another package to the engine module. -------------------------------- M java/org.apache.derby.tools/org/apache/derby/impl/tools/sysinfo/Mai= n.java 4) Formatting nit. -------------------------------- M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/h= arness/FileCompare.java M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/h= arness/RunTest.java M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/h= arness/jvm.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/BaseTestC= ase.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/DerbyCons= tants.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/NetworkSe= rverTestSetup.java M java/org.apache.derby.tests/org/apache/derbyTesting/junit/SecurityM= anagerSetup.java 5) Start child processes with a module path when the harnesses themselves a= re booted with a module path. {noformat} > Re-package Derby as a collection of jigsaw modules > -------------------------------------------------- > > Key: DERBY-6945 > URL: https://issues.apache.org/jira/browse/DERBY-6945 > Project: Derby > Issue Type: Improvement > Affects Versions: 10.13.1.2 > Reporter: Rick Hillegas > Priority: Major > Attachments: derby-6945-01-aa-remove_derbyPreBuild_dep.diff, derb= y-6945-02-ab-newDerbySharedJar.diff, derby-6945-02-ac-newDerbySharedJar.dif= f, derby-6945-03-aa-partitionTest.diff, derby-6945-04-aa-moveRunClass.diff,= derby-6945-05-aa-removeRedundant_Attribute_SQLState.diff, derby-6945-06-aa= -removeOtherSharedDuplicates.diff, derby-6945-07-aa-net_client_overlap.diff= , derby-6945-08-aa-move_shared_iapi_under_shared.diff, derby-6945-08-ab-mov= e_shared_iapi_under_shared.diff, derby-6945-08-ad-move_shared_iapi_under_sh= ared.diff, derby-6945-09-ab-moveInternalDriver.diff, derby-6945-10-aa-moveD= river42.diff, derby-6945-11-ab-moveAutoloadedDriver.diff, derby-6945-12-ab-= moveClientDataSourceInterface.diff, derby-6945-13-aa-create-ClientAutoloade= dDriver.diff, derby-6945-14-aa-moveMoreEmbeddedClassesOutOfPublicAPI.diff, = derby-6945-15-aa-moveMoreClientClassesOutOfPublicAPI.diff, derby-6945-16-aa= -consolidatePublicAPI.diff, derby-6945-17-aa-resealPackagesIn-derbyshared.d= iff, derby-6945-18-aa-resealLocalizationPackage.diff, derby-6945-19-ad-move= PublicAPIintoToolsJar.diff, derby-6945-20-aa-removeClasslister.diff, derby-= 6945-21-aa-simplifyBuildScripts.diff, derby-6945-21-ab-simplifyBuildScripts= .diff, derby-6945-22-ad-isolateClassesByArtifact.diff, derby-6945-22-ae-iso= lateClassesByArtifact.diff, derby-6945-22-af-isolateClassesByArtifact.diff,= derby-6945-23-aa-upgradeToAnt_1.10.2.diff, derby-6945-24-aa-fixNativeAuthe= nticationServiceTest.diff, derby-6945-25-ab-moduleDescriptors.diff, derby-6= 945-26-aa-packagePrivateTests.diff, derby-6945-27-aa-adjustModulesForTests.= diff, derby-6945-28-aa-testingModuleDescriptor.diff, derby-6945-29-aa-disab= le-SimpleApp-test.diff, derby-6945-30-ab-move-clientmessages-toolsmessages.= diff, derby-6945-31-aa-clientmessages-ResourceBundleProvider.diff, derby-69= 45-32-aa-messageLookupCleanup.diff, derby-6945-33-ab-moveLocalizations.diff= , derby-6945-34-aa-licenseHeaders.diff, derby-6945-35-aa-removeSpuriousChar= acter.diff, derby-6945-36-aa-moduleDescriptorsForLocaleJars.diff, derby-694= 5-38-aa-javadocCleanup.diff, derby-6945-39-aa-javadocCleanup.diff, derby-69= 45-40-aa-generatedSource-dirNames.diff, derby-6945-41-ac-cleanupProductJava= doc.diff, derby-6945-42-aa-cleanupTestJavadoc.diff, derby-6945-43-aa-cleanu= pPublicAPIforJavadoc.diff, derby-6945-44-aa-moduleAwareJavadoc.diff, derby-= 6945-45-aa-fixWarnings.diff, derby-6945-46-aa-jacocoSourceRoots.diff, derby= -6945-47-aa-runModulesWithLocalizations.diff, derby-6945-48-ac-serverWithSe= curityPolicy.diff, derby-6945-49-aa-runSomeTestsWithModulePath.diff, derby-= 6945-XX-moveDataSourceFactories, jdeps.out.tar, weirdAnt.out > > > Once we commit to building with Java 9 (see DERBY-6856), we should consid= er re-packaging Derby as a set of jigsaw modules. This would result in a di= fferent set of release artifacts. This might be a good opportunity to addre= ss the Tomcat artifactory issues raised by issue DERBY-6944. -- This message was sent by Atlassian JIRA (v7.6.3#76005)