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

Getting rid of shitty upstream depedencies #35

Open
ice1000 opened this issue Sep 8, 2021 · 11 comments
Open

Getting rid of shitty upstream depedencies #35

ice1000 opened this issue Sep 8, 2021 · 11 comments
Labels
help wanted Extra attention is needed

Comments

@ice1000
Copy link
Member

ice1000 commented Sep 8, 2021

We are currently suffering from the following projects:

  • Eclipse lsp4j, which is itself a shit mountain (doesn't work with jpms, caused a lot of installation/jlink problems, written in Java 8) and also has shit mountain dependencies (guava, xtext, xtend, etc.)
  • The badass jlink plugin of Gradle -- it is not itself a shit mountain (it's a great project), but it's designed for shit mountains. It aims at repackaging your fatJar into a jpms module and let jlink process it. Aya is built entirely with jpms, so if we have all upstream deps jpms-ed, we can get rid of this plugin entirely.
    • The plugin does not work with Java 19.
      • There are new maintainers now, works with latest Java
  • Gradle -- it is fine at the moment because we still want it to offer us the ability to publish to maven central, but Gradle is also designed for maven style projects. Ughh.
  • ANTLR4-runtime -- doesn't support jpms is the only problem (yet). Seems not very hard to repackage with jpms support.
  • Commonmark -- doesn't support jpms, written in Java 8 with a return-void visitor (Add jlink-compatible Java9/Jigsaw module-info (not automatic modules) commonmark/commonmark-java#125). I think we can take some code from it, repackage, and add jpms support.
  • GSON -- it's a PROJECT FROM GOOGLE so it's gonna be a disaster to depend on it. However, it supports jpms, so I think it's fine to use it (well but people are complaining Move module-info.java to /src/main/java google/gson#1315 (comment)).
  • JImGui -- it doesn't yet have jpms support, but I can add it in a minute since it's my project, so it's a small problem.

Also, I propose removing the tgbot subproject since it's useless.

@ice1000 ice1000 assigned imkiva and Glavo and unassigned imkiva Sep 8, 2021
@re-xyr
Copy link
Member

re-xyr commented Sep 9, 2021

What is jpm?

@ice1000
Copy link
Member Author

ice1000 commented Sep 9, 2021

@re-xyr
Copy link
Member

re-xyr commented Sep 9, 2021

Sounds like Java ecosystem is in a mess. Or probably this is true for every language...

@ice1000
Copy link
Member Author

ice1000 commented Sep 9, 2021

Sounds like Java ecosystem is in a mess.

Yes, this is because Java didn't have a module system or package management system long time ago. The community designed a format called "POM" (probably by maven) and it became the de-facto standard, but starting from Java 9 there is a new, official one. Part of the community is not willing to change, but we're not one of 'em.

@re-xyr
Copy link
Member

re-xyr commented Sep 9, 2021

Seems to be a bad choice of Oracle for not officialize the community solution already.

@ice1000
Copy link
Member Author

ice1000 commented Sep 9, 2021

Seems to be a bad choice of Oracle for not officialize the community solution already.

I don't know. There are pros and cons. The community solution relies on jars, while the official one is based on modules. By that, we can trim unused modules when packaging the application, giving rise to smaller releases. The jar-based solution often uses some hacks to remove unused classes

@ice1000
Copy link
Member Author

ice1000 commented Sep 9, 2021

Also maybe it's hard for the standard library to be modularized in a way the community do

@ice1000
Copy link
Member Author

ice1000 commented Sep 9, 2021

Idk

@ice1000
Copy link
Member Author

ice1000 commented Sep 10, 2021

I decide to delay this until we reach some late-milestone, like 0.12 or 0.15, after some major language features are worked upon.

@ice1000 ice1000 transferred this issue from aya-prover/aya-prover-proto Sep 28, 2021
@ice1000 ice1000 unassigned imkiva and Glavo Nov 12, 2021
@ice1000 ice1000 added the help wanted Extra attention is needed label Nov 13, 2021
bors bot added a commit that referenced this issue Dec 3, 2021
254: Use commonmark packaged by ourselves r=ice1000 a=ice1000

bors merge this part of #35 

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
@ice1000
Copy link
Member Author

ice1000 commented Sep 24, 2022

runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.eclipse.lsp4j:org.eclipse.lsp4j:0.15.0
|    +--- org.eclipse.lsp4j:org.eclipse.lsp4j.generator:0.15.0
|    |    +--- org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.15.0
|    |    |    \--- com.google.code.gson:gson:[2.9.0,2.10) -> 2.9.1
|    |    \--- org.eclipse.xtend:org.eclipse.xtend.lib:2.24.0
|    |         +--- org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.24.0
|    |         |    \--- com.google.guava:guava:27.1-jre
|    |         |         +--- com.google.guava:failureaccess:1.0.1
|    |         |         +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
|    |         |         +--- com.google.code.findbugs:jsr305:3.0.2
|    |         |         +--- org.checkerframework:checker-qual:2.5.2
|    |         |         +--- com.google.errorprone:error_prone_annotations:2.2.0
|    |         |         +--- com.google.j2objc:j2objc-annotations:1.1
|    |         |         \--- org.codehaus.mojo:animal-sniffer-annotations:1.17
|    |         \--- org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.24.0
|    |              \--- org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.24.0 (*)
|    \--- org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.15.0 (*)
+--- org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.15.0 (*)
\--- project :cli
     +--- project :base
     |    +--- project :tools
     |    |    +--- org.jetbrains:annotations:23.0.0
     |    |    +--- org.glavo.kala:kala-common:0.50.0
     |    |    |    +--- org.glavo.kala:kala-base:0.50.0
     |    |    |    +--- org.glavo.kala:kala-collection:0.50.0
     |    |    |    |    \--- org.glavo.kala:kala-base:0.50.0
     |    |    |    \--- org.glavo.kala:kala-collection-primitive:0.50.0
     |    |    |         +--- org.glavo.kala:kala-base:0.50.0
     |    |    |         \--- org.glavo.kala:kala-collection:0.50.0 (*)
     |    |    \--- project :pretty
     |    |         +--- org.jetbrains:annotations:23.0.0
     |    |         \--- org.glavo.kala:kala-common:0.50.0 (*)
     |    +--- project :pretty (*)
     |    +--- org.aya-prover.guest0x0:cubical:0.17.1
     |    |    \--- org.aya-prover:pretty:0.20 -> project :pretty (*)
     |    \--- org.aya-prover:commonmark:0.19.1
     +--- project :parser
     |    \--- org.antlr:antlr4-runtime:4.10.1
     +--- project :tools-repl
     |    +--- project :pretty (*)
     |    +--- project :tools (*)
     |    +--- org.jline:jline-reader:3.21.0
     |    |    \--- org.jline:jline-terminal:3.21.0
     |    +--- org.jline:jline-terminal:3.21.0
     |    \--- org.antlr:antlr4-runtime:4.10.1
     +--- com.google.code.gson:gson:2.9.1
     +--- info.picocli:picocli:4.6.3
     +--- org.jline:jline-terminal-jansi:3.21.0
     |    +--- org.fusesource.jansi:jansi:2.4.0
     |    \--- org.jline:jline-terminal:3.21.0
     \--- org.jline:jline-builtins:3.21.0
          +--- org.jline:jline-reader:3.21.0 (*)
          \--- org.jline:jline-style:3.21.0
               \--- org.jline:jline-terminal:3.21.0

@ice1000
Copy link
Member Author

ice1000 commented Sep 24, 2022

Removing our own libraries:

runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.eclipse.lsp4j:org.eclipse.lsp4j:0.15.0
|    +--- org.eclipse.lsp4j:org.eclipse.lsp4j.generator:0.15.0
|    |    +--- org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.15.0
|    |    |    \--- com.google.code.gson:gson:[2.9.0,2.10) -> 2.9.1
|    |    \--- org.eclipse.xtend:org.eclipse.xtend.lib:2.24.0
|    |         +--- org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.24.0
|    |         |    \--- com.google.guava:guava:27.1-jre
|    |         |         +--- com.google.guava:failureaccess:1.0.1
|    |         |         +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
|    |         |         +--- com.google.code.findbugs:jsr305:3.0.2
|    |         |         +--- org.checkerframework:checker-qual:2.5.2
|    |         |         +--- com.google.errorprone:error_prone_annotations:2.2.0
|    |         |         +--- com.google.j2objc:j2objc-annotations:1.1
|    |         |         \--- org.codehaus.mojo:animal-sniffer-annotations:1.17
|    |         \--- org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.24.0
|    |              \--- org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.24.0 (*)
|    \--- org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.15.0 (*)
+--- org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.15.0 (*)
\--- project :cli
     +--- project :base
     |    +--- project :tools
     |    |    +--- org.jetbrains:annotations:23.0.0
     |    |    \--- project :pretty
     |    |         +--- org.jetbrains:annotations:23.0.0
     +--- project :parser
     |    \--- org.antlr:antlr4-runtime:4.10.1
     +--- project :tools-repl
     |    +--- org.jline:jline-reader:3.21.0
     |    |    \--- org.jline:jline-terminal:3.21.0
     |    +--- org.jline:jline-terminal:3.21.0
     |    \--- org.antlr:antlr4-runtime:4.10.1
     +--- com.google.code.gson:gson:2.9.1
     +--- info.picocli:picocli:4.6.3
     +--- org.jline:jline-terminal-jansi:3.21.0
     |    +--- org.fusesource.jansi:jansi:2.4.0
     |    \--- org.jline:jline-terminal:3.21.0
     \--- org.jline:jline-builtins:3.21.0
          +--- org.jline:jline-reader:3.21.0 (*)
          \--- org.jline:jline-style:3.21.0
               \--- org.jline:jline-terminal:3.21.0

bors bot added a commit that referenced this issue Sep 25, 2022
540: Use javacs language server r=ice1000 a=ice1000

A big step of #35

Co-authored-by: `@imkiva`
bors r+

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
Co-authored-by: imkiva <imkiva@islovely.icu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants