keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
377 stars 104 forks source link

bug(mac): Java does not appear to be 100% compatible with InputMethodKit #3935

Open mcdurdin opened 3 years ago

mcdurdin commented 3 years ago

This is a container issue for compatibility issues with Java on macOS.

The following may be related: https://youtrack.jetbrains.com/issue/JBR-1758

Related issues:

mcdurdin commented 3 years ago

See http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8257650 for our submitted bug.

mcdurdin commented 2 years ago

I've gone ahead and closed #174, #458 and #3243, to reduce duplication as they all pertain to the same basic problem.

Note that there may be additional information in those issues that we want to refer to later.

Matt-SIL commented 2 years ago

Have there been any developments with this issue? I just posted on the ELAN forum before seeing this.

https://archive.mpi.nl/forums/t/trouble-with-input-from-syllabic-orthography-keyboard/3468

mcdurdin commented 2 years ago

We have not had any progress with this; it is a limitation in Java and we submitted an issue 4 years ago for it (https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8195675). Feel free to submit another bug to Oracle!

Matt-SIL commented 2 years ago

Ok, I'm not sure I know enough to submit a bug with all the technical info they need but I would live to tell them this potentially affects a large number of minority languages.

mcdurdin commented 2 years ago

It's difficult -- I hope that bug reports from various people would help them to understand the scope. In theory we could submit a patch, but the amount of legwork that is required to do that seems daunting! (This seems to be a problem with quite a few large open source projects -- they develop policies and procedures which work for them but effectively lock out external contributors who already have to navigate huge technical complexity in order to submit patches, and the additional policy complexity just makes it too hard.)

JuarezRC commented 1 year ago

Hi @mcdurdin, I have a similar issue running the IPA(SIL) Keyboard on Mac. They keyboard works well everywhere, except for ELAN. Any recommendation where I should look for a solution?

mcdurdin commented 1 year ago

@JuarezRC, yes, this is a long-standing issue. We are waiting for Java developers to fix things on their end -- Keyman is behaving correctly; Java (which ELAN is built on) is not. The two bug reports above have had no response from Oracle or any Java Development Kit developers; we may need to try and raise them in forums or Java dev mailing lists. We have not had the in-team capacity to chase these up until now.

Can I encourage you to also open a bug report or ask on the Java Discussion group (looks like awkward timing though as they are migrating their Discussion databases in the next couple of days -- may want to wait a week).

Other possible workarounds, even if not palatable -- mentioned for completeness:

We will also have another go at contributing a patch to JDK when we find the capacity (@sgschantz this may be something you could look into?)

JuarezRC commented 1 year ago

Thanks! I will follow up on this.

mcdurdin commented 9 months ago

OpenJDK:

mcdurdin commented 9 months ago

@srl295 please review

mcdurdin commented 9 months ago

See https://github.com/keymanapp/keyman/pull/3944 for sample patch

srl295 commented 4 months ago

PR: https://github.com/openjdk/jdk/pull/17921

mcdurdin commented 3 months ago

Some positive progress on this with openjdk, follow links above

mcdurdin commented 3 months ago

See also https://community.software.sil.org/t/keyman-and-xlingpaper/8580/1 (presumably XMLMind which XLingPaper is based on)

AndyBlack commented 2 months ago

See also https://community.software.sil.org/t/keyman-and-xlingpaper/8580/1 (presumably XMLMind which XLingPaper is based on)

Yes, the XMLmind XL Editor (aka XXE) is written in Java and XLingPaper is a set of configuration files for it. The challenge we'll face is that most XLingPaper users are using an older version of XXE which still had a personal use license. The version they're using will not have the fix to the openjdk. Sigh.

mcdurdin commented 2 months ago

@srl295 do you have any updates on the OpenJDK fix?

srl295 commented 1 month ago

The OpenJDK PR is approved and should merge tomorrow into Java 23

mcdurdin commented 1 month ago

Process: we'll keep this open as we track back-ports into earlier versions of Java.

AndyBlack commented 1 month ago

If I understand this correctly, then you will try to make this needed change in earlier versions of Java. Thank you! For XLingPaper, it looks like the version of the XMLmind XML Editor we're using is based on Java version 1.8.0_181 (or higher). For the other Java-based applications I'm responsible for, we've been using 1.8.0_162 (which is the last "free" one, I understand). These applications are https://software.sil.org/lingtree/, https://software.sil.org/lingtree/diagsap/, https://software.sil.org/paws/, and https://software.sil.org/asheninka/.

srl295 commented 1 month ago

If I understand this correctly, then you will try to make this needed change in earlier versions of Java. Thank you!

For XLingPaper, it looks like the version of the XMLmind XML Editor we're using is based on Java version 1.8.0_181 (or higher).

For the other Java-based applications I'm responsible for, we've been using 1.8.0_162 (which is the last "free" one, I understand). These applications are https://software.sil.org/lingtree/, https://software.sil.org/lingtree/diagsap/, https://software.sil.org/paws/, and https://software.sil.org/asheninka/.

Ouch 1.8? I think 11 is the earliest in the openjdk tree. 1.8 may be challenging. Update: oracle says they are not making public updates to 8.

As to "free" are you familiar with Temurin? https://adoptium.net/temurin/ fully certified binaries for v21.. free.

AndyBlack commented 1 month ago

I cannot control the version for the XMLmind XML Editor. For the apps I'm responsible for, I've been keeping with 8 mainly because it came with easy-to-use installer mechanisms for Windows, Mac, and Linux. I have built one other Java app using 17 but for Windows only and found the learning curve for installers a bit high. I'm not against climbing the learning curve, it just appears to be very time consuming since there is so much I do not control... Having some examples to follow would be helpful. For 17, I've used Azul Zulu which is also free. They even fixed a bug I found... See https://www.azul.com/downloads/?package=jdk#zulu

srl295 commented 1 month ago

I cannot control the version for the XMLmind XML Editor. For the apps I'm responsible for, I've been keeping with 8 mainly because it came with easy-to-use installer mechanisms for Windows, Mac, and Linux. I have built one other Java app using 17 but for Windows only and found the learning curve for installers a bit high. I'm not against climbing the learning curve, it just appears to be very time consuming since there is so much I do not control... Having some examples to follow would be helpful.

Temurin has installers for Windows. Here's an article about using jlink with temurin. https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/

jpackage can build installers https://docs.oracle.com/en/java/javase/17/jpackage/packaging-overview.html#GUID-E0966C49-ABBB-46A2-8DF7-1D3F96640F05

For 17, I've used Azul Zulu which is also free. They even fixed a bug I found... See https://www.azul.com/downloads/?package=jdk#zulu

Azul says it is builds of openjdk. So if it were backported to OpenJDK 17, it should show up in Azul.

AndyBlack commented 1 month ago

Thanks