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

Fix syntax generation code for Java 11+ #3

Closed
axvr opened this issue Nov 14, 2020 · 6 comments · Fixed by #7
Closed

Fix syntax generation code for Java 11+ #3

axvr opened this issue Nov 14, 2020 · 6 comments · Fixed by #7
Labels
highlighting Affects syntax highlighting

Comments

@axvr
Copy link
Member

axvr commented Nov 14, 2020

Currently the syntax generation code only works on Java 8 (and below) as the latest JDK versions no longer contain some classes we used for reflection.

These missing classes are:

  • java.util.regex.Pattern$CharPropertyNames
  • java.util.regex.UnicodeProp

To fix this the reflection code needs replacing as there are no straightforward replacements for these classes.

I have already done some work on building the new reflection code.

@axvr axvr self-assigned this Nov 14, 2020
@Deraen
Copy link
Member

Deraen commented Dec 29, 2020

Better to replace all the reflection accessing the private fields here. Some things can be found from public java properties, some might need to be retrieved from other sources.

At least most of unicode script/block aliases etc. can be retrieved from http://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt
(names should be public on Java classes, just aliases are private)

Java group names probably can be just hardcoded.

@axvr
Copy link
Member Author

axvr commented Dec 29, 2020

Sorry @Deraen, I've been meaning to get round to finishing this for a while, but I've been busy trying to complete another project. I should be able to start working on it (and clojure.vim in general) again in January 2021.

@Deraen
Copy link
Member

Deraen commented Dec 30, 2020

@axvr If it is okay for you, I might be interested in taking a stab at this myself?

@axvr
Copy link
Member Author

axvr commented Dec 30, 2020

Of course, go ahead.

If it helps, here is a link to the new reflection/grouping code I had been working on. It's in need of some cleaning up but it was working for me. https://gist.github.com/axvr/493da316b241c98a059fded5f024e75f

@Deraen
Copy link
Member

Deraen commented Dec 30, 2020

I didn't look into changing Clojure fn/macro etc. lists, I just replaced the reflection code in Regex properties part, PR open now.

@axvr axvr linked a pull request Dec 31, 2020 that will close this issue
@axvr
Copy link
Member Author

axvr commented Dec 31, 2020

Ah yes you're right, I misdiagnosed the issue as being both the fn/macro list generation and Unicode generation being broken on latest JDK.

@Deraen Deraen closed this as completed in #7 Jan 19, 2021
@axvr axvr added the highlighting Affects syntax highlighting label Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
highlighting Affects syntax highlighting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants