Add annotation processor (java + ksp) that can execute at compile-time
@solonovamax がすでに取り組んでいます。
2024年2月5日 から。
評価
この issue はまだ評価されていません。
説明
Add an implementation of the annotation processors that can be run at compile time to parse the commands into a file format that can then be loaded at runtime. the format could, perhaps, be json.
Annotation processors implementing javax.annotation.processing.Processor and com.google.devtools.ksp.processing.SymbolProcessor would be quite beneficial, as it would anyone using the cloud annotations api to avoid having to scan the classpath to register their commands using something like reflections, and is much more convenient than having to manually list all the classes with commands.
I'm going to look into doing this myself, but for some reason gh mobile doesn't let me assign myself while creating the issue.
ways it could be done:
- simply serialize a json array of class names to run reflection on at runtime
- run the reflection & annotation processing (eg. interpreting the value of the
@Command(String)annotation, parsing the default value (if possible), etc.) at compile time instead of runtime then serialize this as a json datastructure. the format could be smth like this (not comprehensive):commands: - class: [class name] root: [root command name] permission: [permission] meta: [meta stuff] - commands: [list of nested commands] method: [method name] name: [command name] permission: permission meta: [meta stuff] arguments: - name: [argument name] aliases: [aliases] parameterName: [name of parameter] parameterIndex: [index of parameter] # the index can be used when the class is compiled without parameter names default: value: [default value] # if specified method: [name of method] # if specified type: [fully qualified type] commands: [nested subcommands]
- 主要言語
- Java
- スター
- 546
- フォーク
- 61
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Incendo/cloud のほかの issue
-
難易度 2/5 半日 初心者へのやさしさ 76/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
erkamyaman/rust-anything#963 ·
メンテナーはふだん 1 日以内に返信
-
Deferred
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Sanne/incus-spawn#2768 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
morluto/rea#15041 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Spring SDK returns null for successful plain-text String responses対応中かも @Chrisp12138 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信