Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation with toolchain using JDK 16-ea28 fails due to illegal access to com.sun.tools.javac.code.Symbol$TypeSymbol (worked in 16-ea26) #15538

Closed
yrodiere opened this issue Dec 14, 2020 · 12 comments
Assignees
Milestone

Comments

@yrodiere
Copy link

Expected Behavior

When running Gradle with JDK 8/11, but compiling with JDK16-ea28, compilation should succeed, like it used to with JDK 16-ea26.

Current Behavior

When running Gradle with JDK 8/11, but compiling with JDK 16-ea28, compilation fails due to org.gradle.internal.compiler.java.ClassNameCollector accessing internal JDK classes:

┗ ./gradlew test -Porg.gradle.java.installations.paths=$HOME/tools/java/jdk16 --stacktrace
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x69404801) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x69404801

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:200)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:198)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:179)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x69404801) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x69404801
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:168)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
        at org.gradle.internal.compiler.java.IncrementalCompileTask.call(IncrementalCompileTask.java:74)
        at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:94)
        at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57)
        at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:55)
        at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:40)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkAction.execute(AbstractDaemonCompiler.java:135)
        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
        at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
        at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
        at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
        at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
        at org.gradle.workers.internal.FlatClassLoaderWorker.run(FlatClassLoaderWorker.java:32)
        at org.gradle.workers.internal.FlatClassLoaderWorker.run(FlatClassLoaderWorker.java:22)
        at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:85)
        at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:55)
        at org.gradle.process.internal.worker.request.WorkerAction$1.call(WorkerAction.java:138)
        at org.gradle.process.internal.worker.child.WorkerLogEventListener.withWorkerLoggingProtocol(WorkerLogEventListener.java:41)
        at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:135)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x69404801) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x69404801
        at org.gradle.internal.compiler.java.ClassNameCollector.processSourceFile(ClassNameCollector.java:74)
        at org.gradle.internal.compiler.java.ClassNameCollector.finished(ClassNameCollector.java:57)
        at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:864)
        at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1658)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1612)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
        ... 31 more


* Get more help at https://help.gradle.org

BUILD FAILED in 1s
1 actionable task: 1 executed

This is probably related to the decision to deny illegal accesses by default in JDK 16. Apparently illegal accesses were still allowed in 16-ea26.

Context

Trying to build Hibernate ORM with JDK 16-ea28 using toolchains, since it used to work with JDK 16-ea26.

Steps to Reproduce

See https://github.com/yrodiere/gradle-playground/tree/jdk16-addopen

Your Environment

Build scan URL: https://scans.gradle.com/s/uzbzgyhqcalu2

@yrodiere
Copy link
Author

A possible workaround: add --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED to the compiler fork options.

Something like this (didn't test this exact code, my build is different):

        tasks.withType( JavaCompile ).configureEach {
            options.forkOptions.jvmArgs.addAll( ['--add-opens', 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'] )
        }

@bmuskalla bmuskalla self-assigned this Dec 14, 2020
vyazelenko added a commit to real-logic/agrona that referenced this issue Dec 15, 2020
vyazelenko added a commit to real-logic/aeron that referenced this issue Dec 15, 2020
vyazelenko added a commit to real-logic/simple-binary-encoding that referenced this issue Dec 15, 2020
vyazelenko added a commit to real-logic/benchmarks that referenced this issue Dec 15, 2020
@marcphilipp
Copy link
Contributor

Same goes for 17.ea.1-open: https://ge.junit.org/s/fjk5kkyqzbyc6/failure

@bmuskalla
Copy link
Contributor

@rieske I think once your changes are merged, this can be closed as well

@marcphilipp
Copy link
Contributor

@rieske @bmuskalla Should this be assigned to a 7.x milestone?

@rieske rieske added this to the 7.0 RC1 milestone Feb 26, 2021
@bmuskalla
Copy link
Contributor

Yes, this particular issue has been fixed but overall JDK16 support is still in progress.

@swpalmer
Copy link

Is there any chance of back-porting this to 6.x? 7.x will have potentially breaking changes and may not be an easy upgrade.
(Otherwise I will just have to manually use the --add-opens workaround, which does solve the issue for me.)

@lostiniceland
Copy link

A possible workaround: add --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED to the compiler fork options.

Something like this (didn't test this exact code, my build is different):

        tasks.withType( JavaCompile ).configureEach {
            options.forkOptions.jvmArgs.addAll( ['--add-opens', 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'] )
        }

For the Kotlin-DSL this worked

tasks {
    withType<JavaCompile> {
        options.fork(mapOf(Pair("jvmArgs", listOf("--add-opens", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"))))
    }
}

For some reason options.forkOptions.jvmArgs?.addAll(listOf("--add-opens", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED")) did not work, so I had to fall back on the helper function.

Firionus added a commit to cueglow/glowdtf that referenced this issue Jun 20, 2021
This allows us to use Java 16 (not possible with 6.x due to
gradle/gradle#15538).
vyazelenko added a commit to real-logic/benchmarks that referenced this issue Jul 16, 2021
vyazelenko added a commit to real-logic/simple-binary-encoding that referenced this issue Jul 16, 2021
vyazelenko added a commit to real-logic/agrona that referenced this issue Jul 16, 2021
vyazelenko added a commit to real-logic/aeron that referenced this issue Jul 16, 2021
@SalahAdDin
Copy link

SalahAdDin commented Jul 30, 2021

It does still not work with the official release.
Please, re open this issue.

@ElHyperion
Copy link

Agreed, since the newest Dart update I cannot compile anymore, with JDK 16 nor 8

@FallenChromium
Copy link

I got it working after I've deleted Java 16 from my package manager (Arch Linux -> pacman) and reinstalled jdk11-openjdk and jre11-openjdk. I hope it will help someone

@SalahAdDin
Copy link

@FallenChromium it is a provisional solution, but it should be compatible with JDK 16.

@ElHyperion
Copy link

ElHyperion commented Aug 4, 2021

@FallenChromium I just restarted with JAVA_HOME set to JDK 15 and it works! You can find the jdk15-adoptopenjdk package in AUR if you're on Arch (Manjaro here). Weird that it required a system restart, I thought restarting Code would help, but apparently not...

And don't bother with deleting newer Java versions, setting JAVA_HOME should be sufficient, regardless of what other Java versions you have

devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue Oct 7, 2021
Notes:
 * Gradle was upgraded to 6.9.1 to fix issue with needing to manually open jdk.compiler/com.sun.tools.javac.code. See gradle/gradle#15538, https://docs.gradle.org/6.9/release-notes.html, https://docs.gradle.org/6.9.1/release-notes.html
 * Gradle 6.9.1 can't be run from JDK17. As part of the CI setup, we need to make sure a non-JDK17 is set as the default. See https://docs.gradle.org/6.9.1/userguide/compatibility.html
 * zulu seems to provide more consistent release versions. It may be that we "adopt" is no longer terminilogy that should be used. See https://blog.adoptopenjdk.net/2021/03/transition-to-eclipse-an-update/
 * Some additional hinting was needing in the lambdas in TableHandleManagerSerial. I didn't dig in further why.
 * The gradle property org.gradle.java.installations.auto-download=false was removed from gradle.properties. Users wishing to guard against auto-download should set it as appropriate in ~/.gradle/gradle.properties. Note: auto-download is still disabled for CI.
devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue Oct 7, 2021
Notes:
 * Gradle was upgraded to 6.9.1 to fix issue with needing to manually open jdk.compiler/com.sun.tools.javac.code. See gradle/gradle#15538, https://docs.gradle.org/6.9/release-notes.html, https://docs.gradle.org/6.9.1/release-notes.html
 * Gradle 6.9.1 can't be run from JDK17. As part of the CI setup, we need to make sure a non-JDK17 is set as the default. See https://docs.gradle.org/6.9.1/userguide/compatibility.html
 * zulu seems to provide more consistent release versions. It may be that we "adopt" is no longer terminilogy that should be used. See https://blog.adoptopenjdk.net/2021/03/transition-to-eclipse-an-update/
 * Groovy does not like to compile the test code for open-api-lang-tools with JDK17. Various things were tried. Ended up setting Groovy compiler to 8 for now. May need to bump groovy version?
 * Some additional hinting was needing in the lambdas in TableHandleManagerSerial. I didn't dig in further why.
 * The gradle property org.gradle.java.installations.auto-download=false was removed from gradle.properties. Users wishing to guard against auto-download should set it as appropriate in ~/.gradle/gradle.properties. Note: auto-download is still disabled for CI.
Firionus added a commit to cueglow/glowdtf that referenced this issue Oct 19, 2021
* Add Navbars and Tabs for Patch

Also includes first version of support for hotkeys
to navigate.

* Add Navbars and Tabs for Patch

Also includes first version of support for hotkeys
to navigate.

* Add ag-grid example table to Patch

* Add "Add New Fixtures" Button

* Add example data

Just noticed ag-grid won't support range
selection in community edition. Need to use
different table library, e. g. react-data-grid,
tabulator or react-table with our own frontend.

* React Table Example

* Tabulator Example

* Add Example Data and fix Table Height

* Implement PatchState as Context with UUIDs

* Rudimentary Fixture Type Page

* Add New Fixture Route and complicate Routing

* Rudimentary "Add Fixture" Page Layout

* Add WS connect

Reconnecting WebSocket will try to connect.
If it can't, a blocking pop-up will be displayed.

WS uses Proxy in Development, so that on can use the CRA
development server to handle website request while
cueglow-server handles all WebSocket connections.

* Update dependencies and fix some warnings

* Add Cypress

Includes setup according to docs and removing some warnings

* Add custom npm commands for Cypress

For development, start the dev server with `npm start`, then start the
Cypress Test Runner with `npm run cy`. To connect the WebSocket,
start the cueglow-server from its directory with `gradlew run`. Cypress
will direct its request to locahost:3000.

To test against the production server with Cypress, start cueglow-server
with `gradlew run` and start Cypress with `npm run e2e`. It will then direct
all request to localhost:7000.

* Add Cypress Navigation Test and disable examples

* Set up simple smoke test in Jest

Also refactored index.tsx into App.tsx and index.tsx. Jest renders the
App with some fiddling (not transforming blueprintjs and mocking
out sass variable loader). However, for testing the frontend Cypress
should be preferred. Jest would be useful for simple unit tests that
do not depend on much else in the App, like testing an algorithm.

* Make outline for WS API Mock Test

* Remove Non-API WebSocket Message on Connect

* Update Dependencies

* Remove sass-extract-loader for Blueprint Variables

sass-extract-loader is practically unmaintained, the last commit was
about three years ago. I replaced it with manually added SCSS module
exports that are wrapped in a TypeScript module.

* Update to npm v7

* Replace react-hotkeys-hook with Blueprint

* Remove reconnecting-websocket

Instead, we'll try once to connectr the WebSocket on page load.
See #52 for
implementing automatic reconnection

* Only Render App When Connection is Open

if connection isn't open, we render other pages.

* Refactor App into Multiple Files

* Delete index.css and move to SCSS

* Resolve Lint Warnings

* Clean Up ConnectionProvider Architecture

Specifically, use a Property Event Handler in a connecitonProvider class.
The interface hook was moved to the single component where
it is allowed to be used. The hook registers its own event handler.

* Write Some Types for Patch Messages

* Add Gradle Task without Frontend Build

closes #54

* Subscribe to Patch Topic

Current design is clunky but will be improved down
the line.

* Implement Upload Fixture Type

* Handle Add Fixture Types

* Avoid Setting Patch Callback on Every Change

* Make Patch Data Handler Global Singleton

This way, the message handler can call into the
patch data handler, making it superfluous to register
callbacks.

* Create Classes for Outgoing Messages

* Implement Crude Remove Fixture Types

The UI, the code, everything is suboptimal here.
Significant issues were marked with TODO comments.

* Implement addFixtures and removeFixtures

* Test Add/Remove Fixtures/Fixture Types

Still need to fix warning about Cypress commands in async function.

* Refactor Setup from JS to Cypress Promise

* Refactor Cypress Tests

- Change all files to TypeScript
- Refactor clearFixtureTypes to custom command
- Add dataCy command example from website

* Warn on Explicit any type

* Show Message When No Fixture Type Is Selected

* Change Title and favicon

The green play button isn't final, but better than the React logo.

* Test WebSocket Connection Error Behavior

* Remove Explicit Any

There seems to be issues with typings for react-tabulator not being
recognized.

* Remove TODOs: Refactor PatchDataProvider

* Move Tabulator CSS Imports into index.scss

* Remove TODOs in NewFixture

- missing default handling moved to #50
- current implementation with Blueprint's Suggest works fine
- Triangle is not super needed, so let's drop it

* Wrap ReactTabulator in Strongly Typed Element

We achieve this by using types from @types/tabulator-tables and
applying them for the React element from
react-tabulator.

This has the benefit of much improved IDE tooling and better
type safety.

* Fix: Show Selection Change in FixturePatch

Previously, one had to click twice on a fixture row to
show the selection, although it was selected for remove after the
first click. Fixed with useMemo, though I don't know why it works.

* Allow Selection of Multiple PatchFixtures

Also change selection callbacks from rowSelected to rowSelectionChanged
to include deselection.

* Fix Gradle Deprecation Warnings

* Fix RunNoNpm

Previously, RunNoNpm would exclude the relevant task during the
configuration phase, meaning the excluded task would never run at all.
This is now fixed: npm_run_build runs when using gradle run, but not
with gradle runNoNpm.

* Update Gradle from 6.7 to 7.1

This allows us to use Java 16 (not possible with 6.x due to
gradle/gradle#15538).

* Fix Cypress Jank

* Add Hotkey to Remove Buttons

* Make FID Editable with Validation

Edits aren't sent to the server yet.

* Make Universe and Address in Patch Editable

* Synchronize Patch Fixture Edits to Server

I introduced lodash as depedency. I don't like it, but it's a common
tool and writing the object merge in TypeScript is very annoying.

Open Issue: Empty Values for the numbers either do nothing
or crash the server connection.

* Fix Connection Drop When Entering Empty FID Value

The protocol does not have a reserved missing value for FID, therefore
an empty FID is just not allowed. This is now enforced by validation.

* Refactor Error Message From Tabulator Validators

* Allow Empty DMX Address

## What API allows:
- set dmxAddress to -1 to unpatch
- set universe to -1 to unpatch

## What we do:
- if  universe is -1, we show an empty string with a formatter, but
this can't be set by the user due to
olifolkerd/tabulator#1700
- dmxAddress can be set to empty string which will be translated with a mutator
to -1 for the server and the other way around

* Add Tests for Patch Fixture Editing

* Add Navigation and Add Hotkeys

* Refactor into HotkeyHint Component

* Fix Typo in Patch Tab "FixtureTypes"

added Space between words

* Organize PatchWindow Imports

* Fix Unique Key Warning on HotkeyHint

* Fix Unique Key Warning on HotkeyHint with Chords

Doesn't occur in our application yet, so I missed it in the
previous commit.

* Keyboard-Only Story for Add Fixtures

- proper tab order
- start focus in first field
- advance to next field after hitting enter in suggest fields
- submit on ctrl+enter
- Test for the above

* Fix Crash: Add Fixtures without Selecting GDTF

now form will not submit when no fixture type is selected

* Reset Selected DmxMode when Fixture Type changes

* Declare Min/Max Values on All New Fixture Fields

* Accept -1 for Universe and Address Server-Side

* Half-Working Form Validation with react-hook-form

* Allow Exiting out of NewFixtures with Esc

Normal HTML inputs don't blur on Esc, so it should be okay
to exit the page on Esc as announced by the Hotkey Label.

Possible Issue: A user assumes Esc will exit out of an input and
the user loses the data her already entered.
Since not much data can be entered in this form,
I think it is fine.

* Show Errors for Fixture Type in AddFixtures

Also delete TODO for Enter on Numeric Fields to
advance to the next field - this is surpsrisingly hard because
JS cannot hook into the native tabIndex.

* Simplify onSubmit in AddFixtures

* Add Error Tooltip for DmxMode in AddFixtures

* Replace Ref for focus by react-hook-form

* Move from useState to watch in reacht-hook-form

* A Little Testing on Form Validation

* Refactor NavbarExitWithTitle into Single Component

* Refactor into ValidatedSuggest

* Refactor NewFixture into Multiple Files

* Install styled-components

For example, it is used in two places, showing off how to
use it inline with the css prop and with the styled interface.

When using the css prop, an import must be manually added:
`import { } from 'styled-components/macro';`

* Refactors to Improve Readability

* Refactor Blueprint Variables API

* Clean Up A Bit in Cypress Folder

* Update CONTRIBUTING with Frontend Info

* Reduce Windows-Linux Redundancy in CONTRIBUTING

* Update to Cypress 8.3.1

* Fix Failing Tests in Chromium

This is a strange issue - clicking on the label and typing does work in
Firefox but not in Chromium. But the issue only shows up when
something is already typed into the field - it works for empty inputs.

Now we just directly type into the input associated with the label,
which works. The code for the utility function to do this is taken from
https://glebbahmutov.com/cypress-examples/6.5.0/recipes/form-input-by-label.html#reusable-function

* Remove Force-Click in Cypress Test

Don't know why it works without force now but I'm happy it does.

* Add Confirmation Dialog when Removing GDTF

* Fix Bug when Re-Adding GDTF

Steps to reproduce fixed bug:
(do not reload between steps)
- Add GDTF file
- Remove GDTF
- Try to add it again

Oberseved before fix: Nothing happens when trying to add again - have to
reload to make it work.

Expected and observed after fix: GDTF is added again the second time

* Move TODO to Issue #57

* Fix Remove GDTF Hotkey Label
devinrsmith added a commit to deephaven/deephaven-core that referenced this issue Oct 19, 2021
* Upgrade compiler to JDK17, fixes #1367.

Notes:
 * Gradle was upgraded to 6.9.1 to fix issue with needing to manually open jdk.compiler/com.sun.tools.javac.code. See gradle/gradle#15538, https://docs.gradle.org/6.9/release-notes.html, https://docs.gradle.org/6.9.1/release-notes.html
 * Gradle 6.9.1 can't be run from JDK17. As part of the CI setup, we need to make sure a non-JDK17 is set as the default. See https://docs.gradle.org/6.9.1/userguide/compatibility.html
 * zulu seems to provide more consistent release versions. It may be that we "adopt" is no longer terminilogy that should be used. See https://blog.adoptopenjdk.net/2021/03/transition-to-eclipse-an-update/
 * Groovy does not like to compile the test code for open-api-lang-tools with JDK17. Various things were tried. Ended up setting Groovy compiler to 8 for now. May need to bump groovy version?
 * Some additional hinting was needing in the lambdas in TableHandleManagerSerial. I didn't dig in further why.
 * The gradle property org.gradle.java.installations.auto-download=false was removed from gradle.properties. Users wishing to guard against auto-download should set it as appropriate in ~/.gradle/gradle.properties. Note: auto-download is still disabled for CI.

* Upgrade groovy to 3.0.9

Notes:
 * Groovy compiler _can_ be bumped up to Java 17, but the construction in gradle is a bit hacky, so it's not enabled.
 * The only module that needs groovy for compilation is open-api-lang-tools for testing.
 * Spock version in open-api-lang-tools for testing needed to be upgraded.
 * Newer spock needed useJUnitPlatform() for tests to run.
 * Various cleanup of open-api-lang-tools dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants