From 6512b0efe4ea407ffe31eab8c6d0ca6f76388149 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Fri, 7 Jun 2024 19:45:18 -0500 Subject: [PATCH] Update to GWT 2.11, clean up old gradle wiring (#5576) Precursor to changes for #188 - updating to GWT 2.11 will make it smoother to follow up with additional updates. The GWT 2.10 release changed the groupId from com.google.gwt to org.gwtproject, but our Gradle plugin does not support the new groupId, so this patch also rewrites automatic dependencies added by the plugin to use the new version. --- buildSrc/src/main/groovy/Classpaths.groovy | 19 +++++++++--------- buildSrc/src/main/groovy/GwtTools.groovy | 14 ++++++++++--- gradle/web-client.gradle | 8 -------- gradle/web-common.gradle | 20 ------------------- open-api/lang-parser/lang-parser.gradle | 2 -- open-api/lang-tools/lang-tools.gradle | 2 -- open-api/shared-fu/shared-fu.gradle | 2 -- web/client-api/client-api.gradle | 3 +-- .../deephaven/web/client/api/CoreClient.java | 2 +- .../web/client/api/HasEventHandling.java | 2 +- .../web/client/api/JsPartitionedTable.java | 2 +- .../io/deephaven/web/client/api/JsTable.java | 4 ++-- .../web/client/api/JsTotalsTableConfig.java | 10 +++++----- .../web/client/api/WorkerConnection.java | 2 +- .../client/api/barrage/stream/BiDiStream.java | 2 +- .../stream/HandshakeStreamFactory.java | 16 +++++++-------- .../client/api/storage/JsStorageService.java | 2 +- .../web/client/api/tree/JsRollupConfig.java | 10 +++++----- .../web/client/api/tree/JsTreeTable.java | 8 ++++---- .../web/client/api/widget/JsWidget.java | 2 +- .../widget/calendar/JsBusinessCalendar.java | 6 +++--- .../client/api/widget/calendar/JsHoliday.java | 2 +- .../web/client/api/widget/plot/ChartData.java | 6 +++--- .../api/widget/plot/FigureSubscription.java | 2 +- .../api/widget/plot/JsChartDescriptor.java | 6 +++--- .../api/widget/plot/JsFigureDescriptor.java | 8 ++++---- .../api/widget/plot/JsFigureFactory.java | 2 +- .../client/api/widget/plot/JsMultiSeries.java | 2 +- .../api/widget/plot/JsSeriesDescriptor.java | 2 +- .../web/client/api/widget/plot/OneClick.java | 2 +- .../io/deephaven/web/client/fu/JsItr.java | 2 +- .../deephaven/web/client/ide/IdeSession.java | 4 ++-- .../client/api/AbstractAsyncGwtTestCase.java | 4 ++-- .../client/api/TableManipulationTestGwt.java | 2 +- web/client-backplane/client-backplane.gradle | 7 +------ .../table_pb_service/TableServiceClient.java | 2 -- web/shared-beans/shared-beans.gradle | 2 -- 37 files changed, 78 insertions(+), 115 deletions(-) delete mode 100644 gradle/web-client.gradle delete mode 100644 gradle/web-common.gradle diff --git a/buildSrc/src/main/groovy/Classpaths.groovy b/buildSrc/src/main/groovy/Classpaths.groovy index caf4f5769d1..3624a77f408 100644 --- a/buildSrc/src/main/groovy/Classpaths.groovy +++ b/buildSrc/src/main/groovy/Classpaths.groovy @@ -21,10 +21,10 @@ import org.gradle.internal.Actions class Classpaths { static final String ELEMENTAL_GROUP = 'com.google.elemental2' - static final String ELEMENTAL_VERSION = '1.1.0' + static final String ELEMENTAL_VERSION = '1.2.1' - static final String GWT_GROUP = 'com.google.gwt' - static final String GWT_VERSION = '2.9.0' + static final String GWT_GROUP = 'org.gwtproject' + static final String GWT_VERSION = '2.11.0' static final String JAVA_PARSER_GROUP = 'com.github.javaparser' static final String JAVA_PARSER_NAME = 'javaparser-core' @@ -36,11 +36,10 @@ class Classpaths { static final String JAVAX_ANNOTATIONS_NAME = 'validation-api' static final String JAVAX_ANNOTATIONS_VERSION = '1.0.0.GA' - static final String JETTY_GROUP = 'org.eclipse.jetty' - static final String JETTY_VERSION = '9.4.20.v20190813' + static final String JETTY_VERSION = '9.4.44.v20210927' static final String JS_INTEROP_GROUP = 'com.google.jsinterop' - static final String JS_INTEROP_VERSION = '2.0.0' + static final String JS_INTEROP_VERSION = '2.0.2' static final String COMMONS_GROUP = 'org.apache.commons' @@ -158,9 +157,9 @@ class Classpaths { if (addDependency(config, GWT_GROUP, name, GWT_VERSION)) { // when we add gwt-dev, lets also force asm version, just to be safe. name == 'gwt-dev' && config.resolutionStrategy { - force 'org.ow2.asm:asm:5.0.3' - force 'org.ow2.asm:asm-util:5.0.3' - force 'org.ow2.asm:asm-commons:5.0.3' + force 'org.ow2.asm:asm:9.2' + force 'org.ow2.asm:asm-util:9.2' + force 'org.ow2.asm:asm-commons:9.2' } } } @@ -180,7 +179,7 @@ class Classpaths { addDependency config, JS_INTEROP_GROUP, name, // google is annoying, and have different versions released for the same groupId // :base: is the only one that is different, so we'll use it in the ternary. - name == 'base'? '1.0.0' : JS_INTEROP_VERSION + name == 'base'? '1.0.1' : JS_INTEROP_VERSION } static void inheritElemental(Project p, String name, String configName) { diff --git a/buildSrc/src/main/groovy/GwtTools.groovy b/buildSrc/src/main/groovy/GwtTools.groovy index 64517239f87..c33b299c419 100644 --- a/buildSrc/src/main/groovy/GwtTools.groovy +++ b/buildSrc/src/main/groovy/GwtTools.groovy @@ -5,13 +5,12 @@ import de.esoco.gwt.gradle.task.GwtCheckTask import de.esoco.gwt.gradle.task.GwtCompileTask import groovy.transform.CompileStatic import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.plugins.JavaPlugin import org.gradle.api.tasks.compile.JavaCompile -import java.nio.file.Files - /** * Helper to simplify / centralize configuring gwt plugins in build files */ @@ -83,8 +82,17 @@ class GwtTools { static void applyDefaults(Project p, GwtExtension gwt, boolean compile = false) { gwt.gwtVersion = Classpaths.GWT_VERSION gwt.jettyVersion = Classpaths.JETTY_VERSION + p.configurations.all { Configuration c -> + c.resolutionStrategy.dependencySubstitution { sub -> + sub.substitute(sub.module("com.google.gwt:gwt-codeserver")) + .using(sub.module("org.gwtproject:gwt-codeserver:${Classpaths.GWT_VERSION}")) + sub.substitute(sub.module("com.google.gwt:gwt-user")) + .using(sub.module("org.gwtproject:gwt-user:${Classpaths.GWT_VERSION}")) + sub.substitute(sub.module("com.google.gwt:gwt-dev")) + .using(sub.module("org.gwtproject:gwt-dev:${Classpaths.GWT_VERSION}")) + } + } if (compile) { - String warPath = new File(p.buildDir, 'gwt').absolutePath gwt.compile.with { diff --git a/gradle/web-client.gradle b/gradle/web-client.gradle deleted file mode 100644 index 6f909db8d0c..00000000000 --- a/gradle/web-client.gradle +++ /dev/null @@ -1,8 +0,0 @@ -apply from: "$rootDir/gradle/web-common.gradle" - -// To perform production compile: gw gCo (./gradlew gwtCompile) -// To start the dev server: gw gCS (./gradlew gwtCodeServer) - -Classpaths.inheritGwt project, 'gwt-user', 'compileOnly' -Classpaths.inheritGwt project, 'gwt-user', 'testImplementation' -Classpaths.inheritGwt project, 'gwt-dev', 'testImplementation' diff --git a/gradle/web-common.gradle b/gradle/web-common.gradle deleted file mode 100644 index af8341ff820..00000000000 --- a/gradle/web-common.gradle +++ /dev/null @@ -1,20 +0,0 @@ -// basics of a java project; -apply plugin: 'java' - -// we are explicitly setting sourceSets to "standard defaults" -// since the rest of dh uses simple `src` folder names, -// and we use "project already configured themselves" -// to tell the root buildscript to leave these alone. -sourceSets { - main { - java.setSrcDirs (['src/main/java']) - resources.setSrcDirs (['src/main/resources']) - resources.setExcludes([]) - } - test { - java.setSrcDirs (['src/test/java']) - resources.setSrcDirs (['src/test/resources']) - resources.setExcludes([]) - } -} - diff --git a/open-api/lang-parser/lang-parser.gradle b/open-api/lang-parser/lang-parser.gradle index d785dc7c187..dc1b7bf805f 100644 --- a/open-api/lang-parser/lang-parser.gradle +++ b/open-api/lang-parser/lang-parser.gradle @@ -7,8 +7,6 @@ plugins { id 'io.deephaven.project.register' } -apply from: "$rootDir/gradle/web-common.gradle" - dependencies { implementation project(':Util') api project(':open-api-shared-fu') diff --git a/open-api/lang-tools/lang-tools.gradle b/open-api/lang-tools/lang-tools.gradle index 65745757d87..b91c8029f48 100644 --- a/open-api/lang-tools/lang-tools.gradle +++ b/open-api/lang-tools/lang-tools.gradle @@ -4,8 +4,6 @@ plugins { id 'java-library' } -apply from: "$rootDir/gradle/web-common.gradle" - Classpaths.inheritCommonsText(project, 'implementation') dependencies { diff --git a/open-api/shared-fu/shared-fu.gradle b/open-api/shared-fu/shared-fu.gradle index 143e4e15d74..6dbf79ed1cb 100644 --- a/open-api/shared-fu/shared-fu.gradle +++ b/open-api/shared-fu/shared-fu.gradle @@ -2,6 +2,4 @@ plugins { id 'io.deephaven.project.register' } -apply from: "$rootDir/gradle/web-common.gradle" - // Contains all general purpose utilities used across all open-api modules. diff --git a/web/client-api/client-api.gradle b/web/client-api/client-api.gradle index 2aba31ade74..1c480dc5b8f 100644 --- a/web/client-api/client-api.gradle +++ b/web/client-api/client-api.gradle @@ -10,8 +10,6 @@ plugins { evaluationDependsOn(Docker.registryProject('selenium')) -apply from: "$rootDir/gradle/web-client.gradle" - configurations { js dts @@ -35,6 +33,7 @@ dependencies { Classpaths.inheritElemental(project, 'elemental2-core', 'implementation') Classpaths.inheritElemental(project, 'elemental2-promise', 'implementation') Classpaths.inheritElemental(project, 'elemental2-dom', 'implementation') +Classpaths.inheritGwt(project, 'gwt-user', 'testImplementation') GwtTools.gwtCompile project, 'io.deephaven.web.DeephavenApi', 'Create a jar of client JS API' diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/CoreClient.java b/web/client-api/src/main/java/io/deephaven/web/client/api/CoreClient.java index 2b11d61d8aa..8687dedcd18 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/CoreClient.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/CoreClient.java @@ -84,7 +84,7 @@ public String getServerUrl() { public Promise getAuthConfigValues() { return ideConnection.getConnectOptions().then(options -> { BrowserHeaders metadata = new BrowserHeaders(); - JsObject.keys(options.headers).forEach((key, index, arr) -> { + JsObject.keys(options.headers).forEach((key, index) -> { metadata.set(key, options.headers.get(key)); return null; }); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/HasEventHandling.java b/web/client-api/src/main/java/io/deephaven/web/client/api/HasEventHandling.java index adb57092f10..1f39d076dcd 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/HasEventHandling.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/HasEventHandling.java @@ -178,7 +178,7 @@ public void fireEvent(String type, CustomEvent e) { } if (map.has(e.type)) { final JsArray> callbacks = Js.cast(JsArray.from((JsArrayLike>) map.get(e.type))); - callbacks.forEach((item, ind, all) -> { + callbacks.forEach((item, ind) -> { try { item.onEvent(e); } catch (Throwable t) { diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/JsPartitionedTable.java b/web/client-api/src/main/java/io/deephaven/web/client/api/JsPartitionedTable.java index 04e34010d1f..38a184716a6 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/JsPartitionedTable.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/JsPartitionedTable.java @@ -163,7 +163,7 @@ private void handleKeys(Event update) { RangeSet added = eventData.getAdded().getRange(); added.indexIterator().forEachRemaining((long index) -> { // extract the key to use - JsArray key = eventData.getColumns().map((c, p1, p2) -> eventData.getData(index, c)); + JsArray key = eventData.getColumns().map((c, p1) -> eventData.getData(index, c)); knownKeys.add(key.asList()); CustomEventInit> init = CustomEventInit.create(); init.setDetail(key); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/JsTable.java b/web/client-api/src/main/java/io/deephaven/web/client/api/JsTable.java index 6f9a38f096c..4e380631ad7 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/JsTable.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/JsTable.java @@ -634,7 +634,7 @@ default CustomColumn asCustomColumn() { @JsMethod @SuppressWarnings("unusable-by-js") public JsArray applyCustomColumns(JsArray customColumns) { - String[] customColumnStrings = customColumns.map((item, index, array) -> { + String[] customColumnStrings = customColumns.map((item, index) -> { if (item.isString() || item.isCustomColumn()) { return item.toString(); } @@ -1728,7 +1728,7 @@ public void processSnapshot() { return; } JsArray viewportColumns = - getColumns().filter((item, index, all) -> debounce.columns.get(item.getIndex())); + getColumns().filter((item, index) -> debounce.columns.get(item.getIndex())); ViewportData data = new ViewportData(debounce.includedRows, debounce.dataColumns, viewportColumns, currentState.getRowFormatColumn() == null ? NO_ROW_FORMAT_COLUMN : currentState.getRowFormatColumn().getIndex(), diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/JsTotalsTableConfig.java b/web/client-api/src/main/java/io/deephaven/web/client/api/JsTotalsTableConfig.java index 8777f250dd0..b92364c9a6d 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/JsTotalsTableConfig.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/JsTotalsTableConfig.java @@ -133,7 +133,7 @@ public JsTotalsTableConfig(JsPropertyMap source) { if (source.has("operationMap")) { operationMap = source.getAsAny("operationMap").cast(); operationMap.forEach(key -> { - operationMap.get(key).forEach((value, index, array) -> { + operationMap.get(key).forEach((value, index) -> { checkOperation(Js.cast(value)); return null; }); @@ -237,9 +237,9 @@ public AggregateRequest buildRequest(JsArray allColumns) { Map> aggs = new HashMap<>(); List colsNeedingCompoundNames = new ArrayList<>(); Set seenColNames = new HashSet<>(); - groupBy.forEach((col, p1, p2) -> seenColNames.add(Js.cast(col))); + groupBy.forEach((col, p1) -> seenColNames.add(Js.cast(col))); this.operationMap.forEach(colName -> { - this.operationMap.get(colName).forEach((agg, index, arr) -> { + this.operationMap.get(colName).forEach((agg, index) -> { if (!JsAggregationOperation.canAggregateType(agg, columnTypes.get(colName))) { // skip this column. to follow DHE's behavior return null; @@ -272,7 +272,7 @@ public AggregateRequest buildRequest(JsArray allColumns) { AggregationCount count = new AggregationCount(); count.setColumnName("Count"); agg.setCount(count); - aggColumns.forEach((p0, p1, p2) -> { + aggColumns.forEach((p0, p1) -> { String colName = p0.split("=")[0].trim(); customColumns.push(colName + " = Count"); return null; @@ -296,7 +296,7 @@ public AggregateRequest buildRequest(JsArray allColumns) { columns.setSpec(spec); columns.setMatchPairsList(aggColumns); agg.setColumns(columns); - aggColumns.forEach((p0, p1, p2) -> { + aggColumns.forEach((p0, p1) -> { String colName = p0.split("=")[0].trim(); customColumns.push(colName + "= `` + " + colName); return null; diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java b/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java index a3808691c8b..625b80443df 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java @@ -278,7 +278,7 @@ private void connectToWorker() { }), info.getConnectOptions().then(options -> { // set other specified headers, if any - JsObject.keys(options.headers).forEach((key, index, arr) -> { + JsObject.keys(options.headers).forEach((key, index) -> { metadata.set(key, options.headers.get(key)); return null; }); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/BiDiStream.java b/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/BiDiStream.java index 0132c24899b..758fe62f20c 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/BiDiStream.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/BiDiStream.java @@ -187,7 +187,7 @@ static class EmulatedBiDiStream extends BiDiStream { public void send(T payload) { if (responseStream == null) { responseStream = responseStreamFactory.apply(payload); - pending.forEach((p0, p1, p2) -> { + pending.forEach((p0, p1) -> { p0.apply(responseStream); return null; }); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/HandshakeStreamFactory.java b/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/HandshakeStreamFactory.java index 260a85254db..bae2d3c41fd 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/HandshakeStreamFactory.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/stream/HandshakeStreamFactory.java @@ -50,18 +50,18 @@ public static BiDiStream create(WorkerConne Client client = Grpc.client(FlightService.Handshake, (io.deephaven.javascript.proto.dhinternal.grpcweb.grpc.ClientRpcOptions) options); client.onEnd((status, statusMessage, trailers) -> { - listeners.get(STATUS_EVENT_LISTENER_NAME).forEach((item, index, arr) -> item.call(null, + listeners.get(STATUS_EVENT_LISTENER_NAME).forEach((item, index) -> item.call(null, ResponseStreamWrapper.Status.of(status, statusMessage, metadata))); - listeners.get(END_EVENT_LISTENER_NAME).forEach((item, index, arr) -> item.call(null, + listeners.get(END_EVENT_LISTENER_NAME).forEach((item, index) -> item.call(null, ResponseStreamWrapper.Status.of(status, statusMessage, metadata))); listeners.clear(); }); client.onMessage(message -> { - listeners.get(DATA_EVENT_LISTENER_NAME).forEach((item, index, arr) -> item.call(null, message)); + listeners.get(DATA_EVENT_LISTENER_NAME).forEach((item, index) -> item.call(null, message)); }); client.onHeaders(headers -> { listeners.get(HEADERS_EVENT_LISTENER_NAME) - .forEach((item, index, arr) -> item.call(null, headers)); + .forEach((item, index) -> item.call(null, headers)); }); client.start(metadata); @@ -103,20 +103,20 @@ public BidirectionalStream write( props.setDebug(false); props.setOnMessage(responseMessage -> { listeners.get(DATA_EVENT_LISTENER_NAME) - .forEach((item, index, arr) -> item.call(null, responseMessage)); + .forEach((item, index) -> item.call(null, responseMessage)); }); props.setOnEnd((status, statusMessage, trailers) -> { listeners.get(STATUS_EVENT_LISTENER_NAME).forEach( - (item, index, arr) -> item.call(null, + (item, index) -> item.call(null, ResponseStreamWrapper.Status.of(status, statusMessage, metadata))); listeners.get(END_EVENT_LISTENER_NAME).forEach( - (item, index, arr) -> item.call(null, + (item, index) -> item.call(null, ResponseStreamWrapper.Status.of(status, statusMessage, metadata))); listeners.clear(); }); props.setOnHeaders(headers -> { listeners.get(HEADERS_EVENT_LISTENER_NAME) - .forEach((item, index, arr) -> item.call(null, headers)); + .forEach((item, index) -> item.call(null, headers)); }); Request client = Grpc.invoke.onInvoke(BrowserFlightService.OpenHandshake, props); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/storage/JsStorageService.java b/web/client-api/src/main/java/io/deephaven/web/client/api/storage/JsStorageService.java index 0ec927df9ee..2e92acb3c01 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/storage/JsStorageService.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/storage/JsStorageService.java @@ -65,7 +65,7 @@ public Promise> listItems(String path, @JsOptional String return Callbacks.grpcUnaryPromise(c -> client().listItems(req, metadata(), c::apply)) .then(response -> Promise .resolve(response.getItemsList() - .map((item, i, arr) -> JsItemDetails.fromProto(response.getCanonicalPath(), item)))); + .map((item, i) -> JsItemDetails.fromProto(response.getCanonicalPath(), item)))); } /** diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsRollupConfig.java b/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsRollupConfig.java index f2861b1872c..1a0e966abc3 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsRollupConfig.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsRollupConfig.java @@ -115,10 +115,10 @@ public RollupRequest buildRequest(JsArray tableColumns) { Map> aggs = new HashMap<>(); List colsNeedingCompoundNames = new ArrayList<>(); Set seenColNames = new HashSet<>(); - groupingColumns.forEach((col, p1, p2) -> seenColNames.add(Js.cast(col))); + groupingColumns.forEach((col, p1) -> seenColNames.add(Js.cast(col))); this.aggregations.forEach(key -> { LinkedHashSet cols = new LinkedHashSet<>(); - this.aggregations.get(key).forEach((col, index, arr) -> { + this.aggregations.get(key).forEach((col, index) -> { String colName = Js.cast(col); cols.add(colName); if (seenColNames.contains(colName)) { @@ -297,14 +297,14 @@ private JsArray dedup(LinkedHashSet cols, List colsNeedi private String unusedColumnName(JsArray existingColumns, String... suggestedNames) { // Try to use the default column names for (String suggestedName : suggestedNames) { - if (!existingColumns.some((p0, p1, p2) -> p0.getName().equals(suggestedName))) { + if (!existingColumns.some((p0, p1) -> p0.getName().equals(suggestedName))) { return suggestedName; } } // Next add a suffix and use that if possible for (String suggestedName : suggestedNames) { - if (!existingColumns.some((p0, p1, p2) -> p0.getName().equals(suggestedName + "_"))) { + if (!existingColumns.some((p0, p1) -> p0.getName().equals(suggestedName + "_"))) { return suggestedName + "_"; } } @@ -312,7 +312,7 @@ private String unusedColumnName(JsArray existingColumns, String... sugge // Give up and add a timestamp suffix for (String suggestedName : suggestedNames) { if (!existingColumns - .some((p0, p1, p2) -> p0.getName().equals(suggestedName + "_" + System.currentTimeMillis()))) { + .some((p0, p1) -> p0.getName().equals(suggestedName + "_" + System.currentTimeMillis()))) { return suggestedName + "_" + System.currentTimeMillis(); } } diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java b/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java index 37d8fecd497..50808f9776d 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java @@ -158,7 +158,7 @@ private TreeViewportData(double offset, long viewportSize, double treeSize, Colu // Without modifying this.columns (copied and frozen), make sure our key columns are present // in the list of columns that we will copy data for the viewport - keyColumns.forEach((col, p1, p2) -> { + keyColumns.forEach((col, p1) -> { if (this.columns.indexOf(col) == -1) { columns[columns.length] = col; } @@ -567,8 +567,8 @@ private Promise makeKeyTable() { keyTableColumns.push(rowDepthCol); keyTableColumns.push(actionCol); keyTable = connection.newTable( - Js.uncheckedCast(keyTableColumns.map((p0, p1, p2) -> p0.getName())), - Js.uncheckedCast(keyTableColumns.map((p0, p1, p2) -> p0.getType())), + Js.uncheckedCast(keyTableColumns.map((p0, p1) -> p0.getName())), + Js.uncheckedCast(keyTableColumns.map((p0, p1) -> p0.getType())), keyTableData, null, null); @@ -804,7 +804,7 @@ private BitSet makeColumnSubscriptionBitset() { } columnsBitset.set(rowDepthCol.getIndex()); columnsBitset.set(rowExpandedCol.getIndex()); - keyColumns.forEach((p0, p1, p2) -> { + keyColumns.forEach((p0, p1) -> { columnsBitset.set(p0.getIndex()); return null; }); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/JsWidget.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/JsWidget.java index 3581ce102a4..e0a35c53791 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/JsWidget.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/JsWidget.java @@ -145,7 +145,7 @@ public Promise refetch() { messageStream.onData(res -> { JsArray responseObjects = res.getData().getExportedReferencesList() - .map((p0, p1, p2) -> new JsWidgetExportedObject(connection, p0)); + .map((p0, p1) -> new JsWidgetExportedObject(connection, p0)); if (!hasFetched) { response = res; exportedObjects = responseObjects; diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsBusinessCalendar.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsBusinessCalendar.java index c2a50c1417a..837a67a1618 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsBusinessCalendar.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsBusinessCalendar.java @@ -28,9 +28,9 @@ public JsBusinessCalendar(BusinessCalendarDescriptor businessCalendarDescriptor) JsObject.freeze(this.businessCalendarDescriptor); timeZone = JsTimeZone.getTimeZone(businessCalendarDescriptor.getTimeZone()); businessPeriods = - businessCalendarDescriptor.getBusinessPeriodsList().map((p0, p1, p2) -> new JsBusinessPeriod(p0)); + businessCalendarDescriptor.getBusinessPeriodsList().map((p0, p1) -> new JsBusinessPeriod(p0)); JsObject.freeze(businessPeriods); - holidays = businessCalendarDescriptor.getHolidaysList().map((p0, p1, p2) -> new JsHoliday(p0)); + holidays = businessCalendarDescriptor.getHolidaysList().map((p0, p1) -> new JsHoliday(p0)); JsObject.freeze(holidays); } @@ -62,7 +62,7 @@ public JsTimeZone getTimeZone() { @JsProperty public JsArray getBusinessDays() { return businessCalendarDescriptor.getBusinessDaysList() - .map((p0, p1, p2) -> JsDayOfWeek.values()[(int) (double) p0]); + .map((p0, p1) -> JsDayOfWeek.values()[(int) (double) p0]); } /** diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsHoliday.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsHoliday.java index 5cce1d42ee5..f3deea8d0fc 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsHoliday.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/calendar/JsHoliday.java @@ -21,7 +21,7 @@ public class JsHoliday { public JsHoliday(Holiday holiday) { date = new LocalDateWrapper(holiday.getDate().getYear(), holiday.getDate().getMonth(), holiday.getDate().getDay()); - businessPeriods = holiday.getBusinessPeriodsList().map((p0, p1, p2) -> new JsBusinessPeriod(p0)); + businessPeriods = holiday.getBusinessPeriodsList().map((p0, p1) -> new JsBusinessPeriod(p0)); JsObject.freeze(businessPeriods); } diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/ChartData.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/ChartData.java index b81b84dbc3b..8a30411fd33 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/ChartData.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/ChartData.java @@ -128,7 +128,7 @@ public void update(UpdateEventData tableData) { assert cachedData.values().stream().flatMap(m -> m.values().stream()) .allMatch(arr -> arr.length == indexes.length); assert cachedData.values().stream().flatMap(m -> m.values().stream()).allMatch(arr -> arr - .reduce((Object val, Any p1, int p2, JsArray p3) -> ((Integer) val) + 1, 0) == indexes.length); + .reduce((Object val, Any p1, int p2) -> ((Integer) val) + 1, 0) == indexes.length); JsRangeSet fullIndex = tableData.getFullIndex(); PrimitiveIterator.OfLong iter = fullIndex.getRange().indexIterator(); @@ -240,10 +240,10 @@ public JsArray getColumn(String columnName, JsFunction mappingFun private JsArray collectAllData(String columnName, JsFunction mappingFunc, TableData currentUpdate) { Column column = table.findColumn(columnName); if (mappingFunc == null) { - return currentUpdate.getRows().map((p0, p1, p2) -> p0.get(column)); + return currentUpdate.getRows().map((p0, p1) -> p0.get(column)); } - return currentUpdate.getRows().map((p0, p1, p2) -> mappingFunc.apply(p0.get(column))); + return currentUpdate.getRows().map((p0, p1) -> mappingFunc.apply(p0.get(column))); } /** diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/FigureSubscription.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/FigureSubscription.java index e71ba18e458..2b1ed636861 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/FigureSubscription.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/FigureSubscription.java @@ -252,7 +252,7 @@ private Promise subscribe(final Promise tablePromise } TableSubscription sub = table.subscribe( - table.getColumns().filter((c, index, all) -> this.requiredColumns.contains(c.getName()))); + table.getColumns().filter((c, index) -> this.requiredColumns.contains(c.getName()))); // TODO, technically we can probably unsubscribe to the table at this point, since we're listening to the // subscription itself diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsChartDescriptor.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsChartDescriptor.java index ee4147d0238..c6e8f048dc9 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsChartDescriptor.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsChartDescriptor.java @@ -55,21 +55,21 @@ public JsChartDescriptor(JsPropertyMap source) { Map axisMap = new HashMap<>(); if (source.has("axes")) { JsArray axes = source.getAsAny("axes").cast(); - this.axes = Js.uncheckedCast(axes.map((axisSource, index, all) -> { + this.axes = Js.uncheckedCast(axes.map((axisSource, index) -> { if (axisSource instanceof JsAxisDescriptor) { return (JsAxisDescriptor) axisSource; } else { return new JsAxisDescriptor((JsPropertyMap) axisSource); } })); - this.axes.forEach((axis, i, all) -> axisMap.put(axes.getAt(i), axis)); + this.axes.forEach((axis, i) -> axisMap.put(axes.getAt(i), axis)); } else { throw new IllegalArgumentException("'axes' property must be set"); } if (source.has("series")) { JsArray series = source.getAsAny("series").cast(); - this.series = Js.uncheckedCast(series.map((seriesSource, index, all) -> { + this.series = Js.uncheckedCast(series.map((seriesSource, index) -> { if (seriesSource instanceof JsSeriesDescriptor) { return (JsSeriesDescriptor) seriesSource; } else { diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureDescriptor.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureDescriptor.java index aeb5624898b..4d1d4f17e60 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureDescriptor.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureDescriptor.java @@ -50,7 +50,7 @@ public JsFigureDescriptor(JsPropertyMap source) { this(); JsArray charts = JsData.getRequiredProperty(source, "charts").cast(); - this.charts = Js.uncheckedCast(charts.map((chartSource, index, all) -> { + this.charts = Js.uncheckedCast(charts.map((chartSource, index) -> { if (chartSource instanceof JsChartDescriptor) { return (JsChartDescriptor) chartSource; } else { @@ -70,9 +70,9 @@ public JsFigureDescriptor(JsPropertyMap source) { @JsIgnore public JsArray getTables() { Set tableSet = new HashSet<>(); - charts.forEach((chart, i1, a1) -> { - chart.series.forEach((series, i2, a2) -> { - series.dataSources.forEach((source, i3, a3) -> { + charts.forEach((chart, i1) -> { + chart.series.forEach((series, i2) -> { + series.dataSources.forEach((source, i3) -> { tableSet.add(source.table); return null; }); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureFactory.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureFactory.java index 38a6780fcbf..0b2dd4109ca 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureFactory.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsFigureFactory.java @@ -43,7 +43,7 @@ private static Promise create(JsFigureDescriptor descriptor) { FetchObjectResponse response = new FetchObjectResponse(); response.setData(figureDescriptor.serializeBinary()); Promise[] tableCopyPromises = - tables.map((table, index, all) -> table.copy(false)).asArray(new Promise[0]); + tables.map((table, index) -> table.copy(false)).asArray(new Promise[0]); return Promise.all(tableCopyPromises) .then(unknownTableCopies -> { JsArray jsTableCopies = Js.cast(unknownTableCopies); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsMultiSeries.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsMultiSeries.java index 432b9ca6ad9..482bb9e281f 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsMultiSeries.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsMultiSeries.java @@ -84,7 +84,7 @@ private void requestTable(JsPartitionedTable partitionedTable, Object key) { seriesInstance.setDataSourcesList( descriptor.getDataSourcesList() - .map((multiSeriesSource, p1, p2) -> { + .map((multiSeriesSource, p1) -> { SourceDescriptor sourceDescriptor = new SourceDescriptor(); sourceDescriptor.setColumnName(multiSeriesSource.getColumnName()); sourceDescriptor.setAxisId(multiSeriesSource.getAxisId()); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsSeriesDescriptor.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsSeriesDescriptor.java index 3fea7c635a4..8ac17cc7302 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsSeriesDescriptor.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/JsSeriesDescriptor.java @@ -57,7 +57,7 @@ public JsSeriesDescriptor(JsPropertyMap source, Map> dataSources = JsData.getRequiredProperty(source, "dataSources").cast(); - this.dataSources = dataSources.map((sourceSource, index, all) -> new JsSourceDescriptor(sourceSource, axisMap)); + this.dataSources = dataSources.map((sourceSource, index) -> new JsSourceDescriptor(sourceSource, axisMap)); linesVisible = JsData.getNullableBooleanProperty(source, "linesVisible"); shapesVisible = JsData.getNullableBooleanProperty(source, "shapesVisible"); gradientVisible = JsData.getNullableBooleanProperty(source, "gradientVisible"); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/OneClick.java b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/OneClick.java index 2736ecc0344..d95fa11614b 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/OneClick.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/widget/plot/OneClick.java @@ -129,7 +129,7 @@ private Object[] getCurrentKeys() { } // Some of the values aren't set, need to iterate through all the table map keys and select the ones that match - return JsArray.from(partitionedTable.getKeys()).filter((tableKey, index, all) -> { + return JsArray.from(partitionedTable.getKeys()).filter((tableKey, index) -> { if (!(tableKey instanceof String[])) { return false; } diff --git a/web/client-api/src/main/java/io/deephaven/web/client/fu/JsItr.java b/web/client-api/src/main/java/io/deephaven/web/client/fu/JsItr.java index b1254a8f973..d1658750014 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/fu/JsItr.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/fu/JsItr.java @@ -64,7 +64,7 @@ public T next() { * js forEach signature is a bit weird, so we'll adapt it to something saner here */ public static void forEach(JsMap map, JsBiConsumer callback) { - map.forEach((v, k, m) -> { + map.forEach((v, k) -> { callback.apply(k, v); return null; }); diff --git a/web/client-api/src/main/java/io/deephaven/web/client/ide/IdeSession.java b/web/client-api/src/main/java/io/deephaven/web/client/ide/IdeSession.java index 314daf265a9..438c5c857e4 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/ide/IdeSession.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/ide/IdeSession.java @@ -370,7 +370,7 @@ public Promise> getCompl .timeout(JsTable.MAX_BATCH_TIME) .asPromise() .then(res -> Promise.resolve( - res.getCompletionItems().getItemsList().map((item, index, arr) -> LspTranslate.toJs(item))), + res.getCompletionItems().getItemsList().map((item, index) -> LspTranslate.toJs(item))), fail -> { // noinspection unchecked, rawtypes return (Promise>) (Promise) Promise @@ -398,7 +398,7 @@ public Promise> ge .timeout(JsTable.MAX_BATCH_TIME) .asPromise() .then(res -> Promise.resolve( - res.getSignatures().getSignaturesList().map((item, index, arr) -> LspTranslate.toJs(item))), + res.getSignatures().getSignaturesList().map((item, index) -> LspTranslate.toJs(item))), fail -> { // noinspection unchecked, rawtypes return (Promise>) (Promise) Promise diff --git a/web/client-api/src/test/java/io/deephaven/web/client/api/AbstractAsyncGwtTestCase.java b/web/client-api/src/test/java/io/deephaven/web/client/api/AbstractAsyncGwtTestCase.java index 7b36f3b98a5..557f0ec2952 100644 --- a/web/client-api/src/test/java/io/deephaven/web/client/api/AbstractAsyncGwtTestCase.java +++ b/web/client-api/src/test/java/io/deephaven/web/client/api/AbstractAsyncGwtTestCase.java @@ -376,7 +376,7 @@ protected Promise assertNextViewportIs(JsTable table, Function r.get(a)); + return viewportData.getRows().map((r, index) -> r.get(a)); } protected Promise assertNextViewportIs(JsTable table, double... expected) { @@ -389,7 +389,7 @@ protected Promise assertNextViewportIs(JsTable table, double... expecte public static List filterColumns(JsTable table, JsPredicate filter) { List matches = new ArrayList<>(); - table.getColumns().forEach((c, i, arr) -> { + table.getColumns().forEach((c, i) -> { if (filter.test(c)) { matches.add(c); } diff --git a/web/client-api/src/test/java/io/deephaven/web/client/api/TableManipulationTestGwt.java b/web/client-api/src/test/java/io/deephaven/web/client/api/TableManipulationTestGwt.java index b0299cbc9ca..3cea8926e8e 100644 --- a/web/client-api/src/test/java/io/deephaven/web/client/api/TableManipulationTestGwt.java +++ b/web/client-api/src/test/java/io/deephaven/web/client/api/TableManipulationTestGwt.java @@ -505,7 +505,7 @@ public void testDateTimeInFilters() { table.setViewport(0, 2, null); return assertUpdateReceived(table, viewportData -> { - viewportData.getRows().forEach((row, index, all) -> { + viewportData.getRows().forEach((row, index) -> { dates.add(row.get(table.findColumn("Timestamp")).cast()); return null; }); diff --git a/web/client-backplane/client-backplane.gradle b/web/client-backplane/client-backplane.gradle index 789e55560d8..0a9fcab9750 100644 --- a/web/client-backplane/client-backplane.gradle +++ b/web/client-backplane/client-backplane.gradle @@ -2,13 +2,8 @@ plugins { id 'io.deephaven.project.register' } -evaluationDependsOn ':proto' -evaluationDependsOn ':proto:proto-backplane-grpc' - -apply from: "$rootDir/gradle/web-common.gradle" - GwtTools.gwtLib project Classpaths.inheritJsInterop(project, 'base', 'implementation') Classpaths.inheritJsInterop(project, 'jsinterop-annotations', 'compileOnly') Classpaths.inheritElemental(project, 'elemental2-core', 'implementation') -Classpaths.inheritElemental(project, 'elemental2-promise', 'implementation') \ No newline at end of file +Classpaths.inheritElemental(project, 'elemental2-promise', 'implementation') diff --git a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/table_pb_service/TableServiceClient.java b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/table_pb_service/TableServiceClient.java index 1ebc02af377..26614581ffe 100644 --- a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/table_pb_service/TableServiceClient.java +++ b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/table_pb_service/TableServiceClient.java @@ -49,8 +49,6 @@ import jsinterop.base.Js; import jsinterop.base.JsPropertyMap; -import javax.validation.constraints.NotNull; - @JsType( isNative = true, name = "dhinternal.io.deephaven.proto.table_pb_service.TableServiceClient", diff --git a/web/shared-beans/shared-beans.gradle b/web/shared-beans/shared-beans.gradle index fce2b3afde0..8cbca1fba04 100644 --- a/web/shared-beans/shared-beans.gradle +++ b/web/shared-beans/shared-beans.gradle @@ -3,8 +3,6 @@ plugins { id 'java-library' } -apply from: "$rootDir/gradle/web-common.gradle" - GwtTools.gwtLib project configurations {